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

前端 未结 15 2005
旧时难觅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:44

    Try to use pod repo update and pod install again.

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

    I had the same problem and I resolved it like this.

    pod update ...

    (using only Firebase/Core and Analytics)

    I am using xCode version 8.2.1 Hope thats will help to someone.

    If the project is older and there is problem with the other pods, you can update only the pod you want: How to update a single pod without touching other dependencies

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

    In my case with ionic cordova plugin I had just add:

    #import "FIRApp.h"
    

    to CDVGoogleAnalytics.m file

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

    I think this is the correct solution:

    1. pod repo update
    2. pod update

    But I had the same issue and solved it doing the following steps on the command line:

    1. pod repo update
    2. Commented the pod 'Firebase' line from my Podfile
    3. pod install (this removed the old Firebase)
    4. Added the pod 'Firebase' line again.
    5. pod install (added the new Firebase)

    2nd and 3rd steps were the key I think, otherwise CocoaPods didn't try to update it. As I said maybe this could've been solved by doing pod update but now I can't go back and try again.

    After all of this you should see something like: Installing Firebase (3.2.0) Installing FirebaseAnalytics (3.2.0) Installing FirebaseInstanceID (1.0.6) Installing GoogleInterchangeUtilities (1.2.1) Installing GoogleSymbolUtilities (1.1.1) Installing GoogleUtilities (1.3.1)

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

    Update your pods type in terminal

    pod update

    then install the pod agian, worked for me

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

    turns out that hoangpx answer is the right way to fix your bug, changing the pod module's name helps. But remember that when you try to run pod install it appears (or should if isn't already fixed):

    Note: as of Cocoapods 1.0 ‘pod repo update’ does not happen on ‘pod install’ by default.

    meaning you should do pod Firebase update first for updating to version 3.2.0 and later pod install

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