When trying to configure XCode to work with Firebase 3, using the code in the setup docs gives me an error:
https://firebase.google.com/docs/ios/setup#add_the_sdk
<first make sure your Firebase version is 3 by use console to entering your project file and use pod update order to update your Firebase version to 3
Try removing the pods from the podfile and then do a 'pod install'
. Add the pods back and then do another 'pod install'
. Clean your workspace and then build it. It took me a few tries but that ended up working for me.
If you are using ReactNative > 0.62, make sure that you put in AppDelegate.m
#import <Firebase.h>
Before:
#ifdef FB_SONARKIT_ENABLED
Solve this problem like this:
import FirebaseAnalytics
Then need to replace FIRApp
with FirebaseApp
as FIRApp
is deprecated.
Thanks.
In AppDelegate.m file, import this line: #import <Firebase.h>
before #ifdef FB_SONARKIT_ENABLED
line.
All the other answers are spot on, but it sounds like you've got that stuff covered. Make sure you're using CocoaPods 1.0 (or above) and have specified use_frameworks!
in your Podfile.
If you are upgrading, its worth clearing our your Pods/ directory first and possibly running pod deintegrate
to get back to a zero state.