$ yarn add react-native-background-geolocation-firebase
$ npm install --save react-native-background-geolocation-firebase
To open your project in XCode, use the file YourProject.xcworkspace
(not YourProject.xcodeproj
)
$ cd ios
$ pod install
Note
If you've already installed react-native-firebase
, this step will already have been performed.
#import "AppDelegate.h"
.
.
.
+#import <FirebaseCore/FirebaseCore.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.moduleName = @"example";
// You can add your custom initial props in the dictionary below.
// They will be passed down to the ViewController used by React Native.
self.initialProps = @{};
+ [FIRApp configure];
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
From your Firebase Console, copy your downloaded Google-Services-Info.plist
file into your application: