Firebase module installed on ios

I followed all the instructions for integrating the new version of firebase on ios :

  • I downloaded the GoogleService-Info.plist and included it in the project.

  • I installed the framework with cocoapods

The problem with this line is:

 @import Firebase; 

Xcode prints this error:

"Firebase not found"

What's the solution?

My code is:

 #import "AppDelegate.h" @import Firebase @interface AppDelegate () @end @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [FIRApp configure]; // Override point for customization after application launch. return YES; } 

+8
ios firebase
source share
7 answers

I ended up fixing it using

#import <Firebase/Firebase.h>

instead

@import Firebase

+8
source share

You have the same problem when importing. My target build settings turned over "header search path" without flag "$ (inherited)"

'pod update' warns you about this.

He solved the problem for me

Hope this helps

+4
source share

I have the same problem and found a solution here: iOS - Firebase error: using an unresolved FIRApp ID with the supplied code running

Performing the following steps on the terminal command line:

  • Pod repo update
  • Comments the pod line 'Firebase' from my subfile
  • pod install (this removed the old Firebase)
  • Added line "Firebase" again.
  • pod install (new Firebase added)

The second and third steps were the key that I think, otherwise CocoaPods did not try to update it. As I said, perhaps this could be solved by updating the module, but now I can’t go back and try again.

+1
source share

There are two ways to add the Firebase SDK to your iOS project . You can use CocoaPods, in which case it is very important to make sure that your dependency in pod is at your target. For example.

 use_frameworks! platform :ios, '7.0' pod 'Firebase/Analytics' target 'Target1' do end target 'Target2' do end 

CocoaPods has many different ways to set goals, so your subfile might look different. The important thing is that the target you specified is related to the pod - in this case I specified the Google Analytics module so that it is available for all purposes, but if I placed it only in the Target1 do...end block, then it would not be available in Target2.

If you use the framework integration method, make sure that the libraries are listed in the “Linking Binary Files to Libraries” section of the Build Phases tab. This should happen automatically if you drag them into the Frameworks group in Xcode.

Finally, if this does not work, Xcode may cache something bad. Try to open the "Product" menu, hold down the "Advanced" key and click "Empty folder."

0
source share

This is lame, but I fixed the integration issues by adding sources to my project, using containers instead. I had to manually fix several files.

0
source share

I had a similar problem, stating that the FirebaseMessaging module was not found in the header, even if I had the correct subfile setup.

Screenshot 1

 Solution is to remove Cocoapods from project and add it again. 

You can remove CocoaPods from the project using this link .

After that, you can add CocoaPods again using the link.

Below is a snapshot for the subfile that I used.

Screenshot 2

Dependencies in the log that are installed using Pods are displayed below the snapshot.

Screenshot 3

-one
source share

update your containers. open terminal go to the project directory and enter the following command

pod update

-3
source share

All Articles