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(app): clarify iOS setup instructions, especially around use_frameworks #6856

Merged
merged 1 commit into from
Feb 15, 2023
Merged
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
11 changes: 6 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ To allow Firebase on iOS to use the credentials, the Firebase iOS SDK must be co

To do this, open your `/ios/{projectName}/AppDelegate.mm` file (or `AppDelegate.m` if on older react-native), and add the following:

At the top of the file, import the Firebase SDK:
At the top of the file, import the Firebase SDK right after `'#import "AppDelegate.h"'`:
gosunman marked this conversation as resolved.
Show resolved Hide resolved

```
#import <Firebase.h>
Expand All @@ -125,15 +125,16 @@ Within your existing `didFinishLaunchingWithOptions` method, add the following t

Beginning with firebase-ios-sdk v9+ (react-native-firebase v15+) you must tell CocoaPods to use frameworks.

Open the file `./ios/Podfile` and add this line inside your targets:
Open the file `./ios/Podfile` and add this line inside your targets (right after the line calling the react native Podfile function to get the native modules config):

```
use_frameworks!
```ruby
use_frameworks! :linkage => :static
gosunman marked this conversation as resolved.
Show resolved Hide resolved
```

To use Static Frameworks on iOS, you also need to manually enable this for the project with the following global to the top of your `/ios/Podfile` file:
To use Static Frameworks on iOS, you also need to manually enable this for the project with the following global to your `/ios/Podfile` file:

```ruby
# right after `use_frameworks! :linkage => :static`
$RNFirebaseAsStaticFramework = true
```

Expand Down