How to setting up firebase for ios
if you want to connect your IOS app, you have to download configuration file and move to your project.
- Go to firebase console
- Add IOS application
- Enter your projects details
- Enter iOS bundle ID name
- "iOS bundle ID" same as your local project's bundle ID
- You can check your local project bundle ID within "General" from xcode.
- Now download GoogleService-Info.plist file.
- Open local project in xcode.
for open project in xcode just open /ios/{projectName}.xcodeproj file or /ios/{projectName}.xcworkspace if you are using Pods. - Just enable Copy items if needed in Xcode.
- Right click on the project name and "Add files" to the.
Select the downloaded GoogleService-Info.plist file from your computer
Finally you you need to configure app's bootstrap phase.To do this, you have to edit file: ios/{projectName}/AppDelegate.m
At top of the file, Add following line
#import <Firebase.h>
Add didFinishLaunchingWithOptions function with configure function
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
if ([FIRApp defaultApp] == nil) {
[FIRApp configure];
}
Thank you