Home > database >  Where to put these codes when adding firebase to the react native app?
Where to put these codes when adding firebase to the react native app?

Time:03-09

I am trying to use firebase push notifications in my react native iOS app. I am not sure about this step.

Here is the screenshot

its said Add initialization code but when I search my react native app. I saw appDeligate.h and appDeligate.m

idk which file to add and do I need to add objectC or swift code?

CodePudding user response:

You have to add objective C code inside AppDelegate.m file

Keep this thing in mind that must import firebase before FB_SONARKIT_ENABLED this line

#import <Firebase.h>

You just need to copy

[FIRApp configure];

And add it inside didFinishLaunchingWithOptions method

  • Related