{"action":"closed","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/8553","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/8553/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/8553/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/8553/events","html_url":"https://github.com/facebook/react-native/issues/8553","id":163617308,"number":8553,"title":"Linking.canOpenURL cannot tell if the URL is invalid","user":{"login":"clh161","id":4689677,"avatar_url":"https://avatars.githubusercontent.com/u/4689677?v=3","gravatar_id":"","url":"https://api.github.com/users/clh161","html_url":"https://github.com/clh161","followers_url":"https://api.github.com/users/clh161/followers","following_url":"https://api.github.com/users/clh161/following{/other_user}","gists_url":"https://api.github.com/users/clh161/gists{/gist_id}","starred_url":"https://api.github.com/users/clh161/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clh161/subscriptions","organizations_url":"https://api.github.com/users/clh161/orgs","repos_url":"https://api.github.com/users/clh161/repos","events_url":"https://api.github.com/users/clh161/events{/privacy}","received_events_url":"https://api.github.com/users/clh161/received_events","type":"User","site_admin":false},"labels":[{"id":470317962,"url":"https://api.github.com/repos/facebook/react-native/labels/Icebox","name":"Icebox","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-04T07:21:35Z","updated_at":"2016-10-27T22:08:25Z","closed_at":"2016-10-27T22:08:25Z","body":"I am with `RN 0.29 RC` on `iOS`\r\nThe `Linking.canOpenURL` returns `false` even if `Linking.openURL(url)` does work. I guess this happens because at the first time the user attempts to open the url and then a popup will be shown to ask user's permission and `Linking.canOpenURL` will returns `false`. Although this may be logically correct as it is a fact that user cannot open the url if the permission has not been granted, I cannot tell if this is due to invalid URL (i.e. the user has not installed the specific app that has the scheme and I want to remind the user to install or redirect to app store) or permission problem in this case. My code is like this:\r\n\r\n    var url = 'myscheme://';\r\n            Linking.canOpenURL(url).then(supported => {\r\n                if (!supported) {\r\n                    alert('Cannot open!')\r\n                } else {\r\n                    return Linking.openURL(url);\r\n                }\r\n            }).catch(err => console.error('An error occurred', err));\r\n\r\n"}}
{"actor":{"display_login":"mkonicek"}}