iOS - Firebase error: Use of unresolved identifier FIRApp running supplied code

前端 未结 15 2004
旧时难觅i
旧时难觅i 2021-02-02 08:08

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

<
相关标签:
15条回答
  • 2021-02-02 08:36

    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

    0 讨论(0)
  • 2021-02-02 08:36

    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.

    0 讨论(0)
  • 2021-02-02 08:36

    If you are using ReactNative > 0.62, make sure that you put in AppDelegate.m

    #import <Firebase.h>
    

    Before:

    #ifdef FB_SONARKIT_ENABLED
    
    0 讨论(0)
  • 2021-02-02 08:38

    Solve this problem like this:

    import FirebaseAnalytics
    

    Then need to replace FIRApp with FirebaseApp as FIRApp is deprecated.

    Thanks.

    0 讨论(0)
  • 2021-02-02 08:41

    In AppDelegate.m file, import this line: #import <Firebase.h> before #ifdef FB_SONARKIT_ENABLED line.

    0 讨论(0)
  • 2021-02-02 08:43

    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.

    0 讨论(0)
提交回复
热议问题