Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #1062

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,26 @@ Re-declare the activity manually with `tools:node="remove"` in your app's Androi

#### iOS

Inside the `ios` folder find the file `AppDelegate.[swift|m]` add the following to it:
**For react-native 0.77+**

In the file `ios/<YOUR PROJECT>/AppDelegate.swift` add the following:

```swift
// …

@main
class AppDelegate: RCTAppDelegate {
// …

override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
return RCTLinkingManager.application(app, open: url, options: options)
}
}
```

**For react-native < 0.77**

In the file `ios/<YOUR PROJECT>/AppDelegate.mm` add the following:

```objc
#import <React/RCTLinkingManager.h>
Expand All @@ -133,6 +152,10 @@ Inside the `ios` folder find the file `AppDelegate.[swift|m]` add the following
}
```

> This file will be `ios/<YOUR PROJECT>/AppDelegate.m` on applications using the [old architecture](https://reactnative.dev/docs/next/new-architecture-app-intro#ios---use-objective-c-mm-extension).

Next, add a URLScheme using your App's bundle identifier.

Inside the `ios` folder open the `Info.plist` and locate the value for `CFBundleIdentifier`, e.g.

```xml
Expand Down