{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/3643","labels_url":"https://api.github.com/repos/facebook/react-native/issues/3643/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/3643/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/3643/events","html_url":"https://github.com/facebook/react-native/pull/3643","id":113086921,"number":3643,"title":"Exported a callback for native webview delegate method shouldStartLoadWithRequest","user":{"login":"pjcabrera","id":199736,"avatar_url":"https://avatars.githubusercontent.com/u/199736?v=3","gravatar_id":"","url":"https://api.github.com/users/pjcabrera","html_url":"https://github.com/pjcabrera","followers_url":"https://api.github.com/users/pjcabrera/followers","following_url":"https://api.github.com/users/pjcabrera/following{/other_user}","gists_url":"https://api.github.com/users/pjcabrera/gists{/gist_id}","starred_url":"https://api.github.com/users/pjcabrera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjcabrera/subscriptions","organizations_url":"https://api.github.com/users/pjcabrera/orgs","repos_url":"https://api.github.com/users/pjcabrera/repos","events_url":"https://api.github.com/users/pjcabrera/events{/privacy}","received_events_url":"https://api.github.com/users/pjcabrera/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/react-native/labels/CLA%20Signed","name":"CLA Signed","color":"e7e7e7"},{"url":"https://api.github.com/repos/facebook/react-native/labels/GH%20Review:%20review-needed","name":"GH Review: review-needed","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-23T19:42:35Z","updated_at":"2015-10-25T07:38:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/3643","html_url":"https://github.com/facebook/react-native/pull/3643","diff_url":"https://github.com/facebook/react-native/pull/3643.diff","patch_url":"https://github.com/facebook/react-native/pull/3643.patch"},"body":"We have a requirement in our app, to open in mobile Safari, any http:// and https:// links displayed in a web view. Our web view is not full screen and is loaded with an HTML string from the backend. Displaying external content in that web view is outside of the scope of our app, so we open them in mobile Safari.\r\n\r\nI've forked the WebView component and added a callback property, shouldStartLoadWithRequest, and modified the RCTWebView implementation of `webView:shouldStartLoadWithRequest:navigationType:`\r\nto check if the shouldStartLoadWithRequest property is set.\r\n\r\nIf the property is set, `webView:shouldStartLoadWithRequest:navigationType:` passes the URL & navigationType to the callback. The callback is then able to ignore the request, redirect it, open a full screen web view to display the URL content, or even deep link to another app with LinkingIOS.openURL()."},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/150898856","html_url":"https://github.com/facebook/react-native/pull/3643#issuecomment-150898856","issue_url":"https://api.github.com/repos/facebook/react-native/issues/3643","id":150898856,"user":{"login":"facebook-github-bot","id":6422482,"avatar_url":"https://avatars.githubusercontent.com/u/6422482?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook-github-bot","html_url":"https://github.com/facebook-github-bot","followers_url":"https://api.github.com/users/facebook-github-bot/followers","following_url":"https://api.github.com/users/facebook-github-bot/following{/other_user}","gists_url":"https://api.github.com/users/facebook-github-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook-github-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook-github-bot/subscriptions","organizations_url":"https://api.github.com/users/facebook-github-bot/orgs","repos_url":"https://api.github.com/users/facebook-github-bot/repos","events_url":"https://api.github.com/users/facebook-github-bot/events{/privacy}","received_events_url":"https://api.github.com/users/facebook-github-bot/received_events","type":"User","site_admin":false},"created_at":"2015-10-25T07:38:17Z","updated_at":"2015-10-25T07:38:17Z","body":"@pjcabrera updated the pull request."}}