I followed all instructions for integrating the new firebase
release on ios
:
I downloaded the file
GoogleService-Info.plist
and include it in the project.I installed the framework with cocoapods
The problem is with this line:
@import Firebase;
Xcode prints this error:
"Module Firebase not found"
What is the solution?
My code :
#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;
}
Its work for me in this way.
using FirebaseCore/FirebaseCore.h
Try the below code.
I had the same problem. I found that the problem was I have three targets in Cocoapods file. And only my main one target has Firebase added. So that when I want to import Firebase to a file that is used in other targets, Xcode gives error and says Module 'Firebase' not found. This is my pods project file. One solution for me is adding Firebase pod to all targets. Or another solution is removing the file from other targets.
This is lame but i fixed integration problems by adding the sources to my project instead using pods. I had to manually fix few files too.
I have same issue and found solution in here: iOS - Firebase error: Use of unresolved identifier FIRApp running supplied code
Doing the following steps on the terminal command line:
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.
I ended up fixing it by using
#import <Firebase/Firebase.h>
instead of
@import Firebase
I tried the above but sadly, nothing worked. Clean the build folder, clearing Xcode cache helped me. Try this:
Pay extensive attention to the 6th step. Open this newly created xcworkspace, not xcodeproj.
Original answer: https://stackoverflow.com/a/44486792/913601