11 KiB
id, original_id, title
| id | original_id | title |
|---|---|---|
| version-0.20-linkingios | linkingios | linkingios |
LinkingIOS # | Edit on GitHub |
NOTE: LinkingIOS is being deprecated. Use Linking instead.
LinkingIOS gives you a general interface to interact with both incoming
and outgoing app links.
Basic Usage #
Handling deep links #
If your app was launched from an external url registered to your app you can access and handle it from any component you want with
In case you also want to listen to incoming app links during your app's
execution you'll need to add the following lines to you AppDelegate.m:
And then on your React component you'll be able to listen to the events on
LinkingIOS as follows
Triggering App links #
To trigger an app link (browser, email or custom schemas), call
If you want to check if any installed app can handle a given URL beforehand, call
Methods #
static addEventListener(type: string, handler: Function) #
Add a handler to LinkingIOS changes by listening to the url event type
and providing the handler
@deprecated
static removeEventListener(type: string, handler: Function) #
Remove a handler by passing the url event type and the handler
@deprecated
static openURL(url: string) #
Try to open the given url with any of the installed apps.
@deprecated
static canOpenURL(url: string, callback: Function) #
Determine whether or not an installed app can handle a given URL.
The callback function will be called with bool supported as the only argument
NOTE: As of iOS 9, your app needs to provide the LSApplicationQueriesSchemes key
inside Info.plist.
@deprecated
static popInitialURL() #
If the app launch was triggered by an app link, it will pop the link url,
otherwise it will return null
@deprecated