Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions versioned_docs/version-8.x/deep-linking.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,19 @@ See [Expo's documentation on Android App Links](https://docs.expo.dev/linking/an

Let's configure the native iOS app to open based on the `example://` URI scheme.

You'll need to add the `LinkingIOS` folder into your header search paths as described [here](https://reactnative.dev/docs/linking-libraries-ios#step-3). Then you'll need to add the following lines to your or `AppDelegate.swift` or `AppDelegate.mm` file:
You'll need to add the `LinkingIOS` folder into your header search paths as described [here](https://reactnative.dev/docs/linking-libraries-ios#step-3). Then you'll need to add the following lines to your `AppDelegate.swift` or `AppDelegate.mm` file:

<Tabs groupId="ios-lang">
<TabItem value='swift' label='Swift' default>

```swift
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
import React

override func application(
_ app: UIApplication,
open url: URL,
options: [UIApplication.OpenURLOptionsKey : Any] = [:]
) -> Bool {
return RCTLinkingManager.application(app, open: url, options: options)
}
```
Expand Down Expand Up @@ -162,16 +168,17 @@ If your app is using [Universal Links](https://developer.apple.com/ios/universal
<TabItem value='swift' label='Swift' default>

```swift
func application(
override func application(
_ application: UIApplication,
continue userActivity: NSUserActivity,
restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
return RCTLinkingManager.application(
application,
continue: userActivity,
restorationHandler: restorationHandler
)
}
restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void
) -> Bool {
return RCTLinkingManager.application(
application,
continue: userActivity,
restorationHandler: restorationHandler
)
}
```

</TabItem>
Expand Down
Loading