Files
react-native-firebase/docs/app/ios.md
2019-10-03 14:09:09 +01:00

1.1 KiB

title, description
title description
iOS Initialization Initialization Firebase with iOS.

iOS Manual Linking

The following steps are only required if your environment does not have access to React Native auto-linking.

Add on Podfile.lock

ios/Podfile

We recommend using a minimum platform version of at least 9.0 for your application to ensure that the correct version of the Firebase libraries are used, so make sure platform :ios, '9.0 is present at the top of your file. Also add RNFBApp pods inside your target.

platform :ios, '9.0'
//...

target 'yourApp' do
    //...
    pod 'RNFBApp', :path => '../node_modules/@react-native-firebase/app' 
end


Run pod install

You need to use the ios/[YOUR APP NAME].xcworkspace instead of the ios/[YOUR APP NAME].xcproj file from now on.

Add App to AppDelegate.m

ios/{yourApp}/AppDelegate.m

A) At the top of the file:

#import <Firebase.h>

B) At the beginning of the didFinishLaunchingWithOptions:(NSDictionary *)launchOptions method add the following line:

[FIRApp configure];