Adding firebase configuration on Xcode

Firebase doc said…I should add this…to app delegation

@import Firebase;

and

[FIRApp configure];

so I added on

my project root -> platforms -> iOS -> Classes -> AppDelegation.m

AppDelegation.m looks like belows.

#import “AppDelegate.h”
#import “MainViewController.h”
@import Firebase;

@implementation AppDelegate

  • (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
    {
    self.viewController = [[MainViewController alloc] init];
    [FIRApp configure];
    return [super application:application didFinishLaunchingWithOptions:launchOptions];
    }

@end

and I play to see result on emulator…but get error on this…

is it right place to add configuration?

as far as i can remember

  • you don’t need to add this code to your app, this code if for native app,
  • push messages do not work on the emulator.
1 Like