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

docs: Add instructions for iOS AppDelegate.swift on react-native 0.77 #8265

Open
wants to merge 1 commit into
base: main
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
24 changes: 23 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,29 @@ Select the downloaded `GoogleService-Info.plist` file from your computer, and en

![Select 'Copy Items if needed'](https://prismic-io.s3.amazonaws.com/invertase%2F7d37e0ce-3e79-468d-930c-b7dc7bc2e291_unknown+%282%29.png)

#### Configure Firebase with iOS credentials
#### Configure Firebase with iOS credentials (react-native 0.77+)
To allow Firebase on iOS to use the credentials, the Firebase iOS SDK must be configured during the bootstrap phase of your application.

To do this, open your `/ios/{projectName}/AppDelegate.swift` file and add the following:

At the top of the file, import the Firebase SDK right after `'import ReactAppDependencyProvider'`:

```
import Firebase
```

Within your existing `didFinishLaunchingWithOptions` method, add the following to the top of the method:

```
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
// Add me --- \/
FirebaseApp.configure()
// Add me --- /\
// ...
}
```

#### Configure Firebase with iOS credentials (react-native < 0.77)

To allow Firebase on iOS to use the credentials, the Firebase iOS SDK must be configured during the bootstrap phase of your application.

Expand Down
Loading