Skip to content

Commit 684cfed

Browse files
committed
Update LinkingIOS.js
1 parent 415d756 commit 684cfed

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

Libraries/LinkingIOS/LinkingIOS.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ var _initialURL = RCTLinkingManager &&
2222
var DEVICE_NOTIF_EVENT = 'openURL';
2323

2424
/**
25-
* `LinkingIOS` gives you a general interface to interact with both, incoming
26-
* and outgoing app links.
25+
* `LinkingIOS` gives you an interface to interact with both incoming and
26+
* outgoing app links.
2727
*
2828
* ### Basic Usage
2929
*
3030
* #### Handling deep links
3131
*
32-
* If your app was launched from a external url registered to your app you can
33-
* access and handle it from any component you want with
32+
* If your app was launched from an external URL registered with your app, you can
33+
* access and handle it from any component you want with the following:
3434
*
3535
* ```
3636
* componentDidMount() {
@@ -39,7 +39,7 @@ var DEVICE_NOTIF_EVENT = 'openURL';
3939
* }
4040
* ```
4141
*
42-
* In case you also want to listen to incoming app links during your app's
42+
* If you also want to listen to incoming app links during your app's
4343
* execution you'll need to add the following lines to you `*AppDelegate.m`:
4444
*
4545
* ```
@@ -48,7 +48,7 @@ var DEVICE_NOTIF_EVENT = 'openURL';
4848
* }
4949
* ```
5050
*
51-
* And then on your React component you'll be able to listen to the events on
51+
* And in your React component, you'll then be able to listen to the events from
5252
* `LinkingIOS` as follows
5353
*
5454
* ```
@@ -65,13 +65,14 @@ var DEVICE_NOTIF_EVENT = 'openURL';
6565
*
6666
* #### Triggering App links
6767
*
68-
* To trigger an app link (browser, email or custom schemas) you call
68+
* To trigger an app link (browser, email, or custom schemes) you can call:
6969
*
7070
* ```
7171
* LinkingIOS.openURL(url)
7272
* ```
7373
*
74-
* If you want to check if any installed app can handle a given url beforehand you can call
74+
* If you want to check if a URL can be opened by an installed app on the system you can call
75+
*
7576
* ```
7677
* LinkingIOS.canOpenURL(url, (supported) => {
7778
* if (!supported) {
@@ -117,6 +118,8 @@ class LinkingIOS {
117118

118119
/**
119120
* Try to open the given `url` with any of the installed apps.
121+
* If multiple applications can open `url`, the one that opens
122+
* is undefined.
120123
*/
121124
static openURL(url: string) {
122125
invariant(
@@ -127,7 +130,7 @@ class LinkingIOS {
127130
}
128131

129132
/**
130-
* Determine wether or not the an installed app can handle a given `url`
133+
* Determine whether an installed app can handle a given `url`.
131134
* The callback function will be called with `bool supported` as the only argument
132135
*/
133136
static canOpenURL(url: string, callback: Function) {
@@ -143,7 +146,7 @@ class LinkingIOS {
143146
}
144147

145148
/**
146-
* If the app launch was triggered by an app link, it will pop the link url,
149+
* If the app launch was triggered by an app link, it will pop the link URL,
147150
* otherwise it will return `null`
148151
*/
149152
static popInitialURL(): ?string {

0 commit comments

Comments
 (0)