update docs for Linking.openURL

Summary:
What existing problem does the pull request solve?

I was seeing errors in the crash monitoring software for my app in production.  Many took the form of, `Unable to open URL: telprompt:5551231234`

After some research, I found that when the user attempts to call a phone number, a dialog pops up in iOS asking the user to confirm or cancel the call.  If the call is canceled, the promise returned by `openURL` is rejected.

This PR improves the documentation around what happens to the promise returned by `openURL`.

No test plan, text changes only.

Sign the [CLA][2], if you haven't already.

Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

Make sure all **tests pass** on both [Travis][3] and [Circle CI][4]. PRs that break tests are unlikely to be merged.

For more info, see the ["Pull Requests"][5] section of our "Contributing" guidelines.

[1]: https://medium.com/martinkonicek/what-is-a-test-plan-8bfc840ec171#.y9lcuqqi9
[2]: https://code.facebook.com/cla
[3]: https://travis-ci.org/facebook/react-native
[4]: http://circleci.com/gh/facebook/react-native
[5]: https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#pull-requests
Closes https://github.com/facebook/react-native/pull/13624

Differential Revision: D4962161

Pulled By: javache

fbshipit-source-id: c8d5ffbc24ba4c14c85db6ea799a6f95339b94c8
This commit is contained in:
Garrett McCullough 2017-04-28 03:51:50 -07:00 committed by Facebook Github Bot
parent 0a55e42ef6
commit 8da9b04bb6
1 changed files with 4 additions and 0 deletions

View File

@ -153,6 +153,10 @@ class Linking extends NativeEventEmitter {
* or "http://maps.apple.com/?ll=37.484847,-122.148386" on iOS), a contact, * or "http://maps.apple.com/?ll=37.484847,-122.148386" on iOS), a contact,
* or any other URL that can be opened with the installed apps. * or any other URL that can be opened with the installed apps.
* *
* The method returns a `Promise` object. If the user confirms the open dialog or the
* url automatically opens, the promise is resolved. If the user cancels the open dialog
* or there are no registered applications for the url, the promise is rejected.
*
* NOTE: This method will fail if the system doesn't know how to open the specified URL. * NOTE: This method will fail if the system doesn't know how to open the specified URL.
* If you're passing in a non-http(s) URL, it's best to check {@code canOpenURL} first. * If you're passing in a non-http(s) URL, it's best to check {@code canOpenURL} first.
* *