3

I'm developing flutter app and I added firebase auth to project. And it's running fine, but when app loads up console says this. Is this normal behavior? Thank you!

    5.4.1 - [Firebase/Core][I-COR000003]
 The default Firebase app has not yet been configured.
 Add `[FIRApp configure];` (`FirebaseApp.configure()` in Swift)
 to your application initialization.

2 Answers 2

3

Check the configuration of IOS in flutter. Then create a Podfile, inside that file add the following libraries to be able to use Firebase auth:

pod 'Firebase/Core'
pod 'Firebase/Auth'

Then go to this path flutterApp\ios\Runner\AppDelegate.m and import and configure firebase:

#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"

@import Firebase; // new

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

//configure firebase
[FIRApp configure]; // new

[GeneratedPluginRegistrant registerWithRegistry:self];
// Override point for customization after application launch.
return [super application:application didFinishLaunchingWithOptions:launchOptions];

  }

@end
Sign up to request clarification or add additional context in comments.

5 Comments

Thank you Peter but even if I got firebase package in flutter, do I have to do this steps?
Yes, you need to configure it also for IOS, do u have the GoogleService-Info.plist in the ios part?
Oh I didn't know that thank you so much!! Yes I have that in Runner subfolder.
okay please go to this path flutterAppName\ios\Runner\AppDelegate.m and import and configure firebase
@PeterHaddad I wonder how you figured out to use the ios documentation to implement this into flutter? It is not written in any other documentation. This solution helps with the error of the question, but there are still google sign-in errors in my project. To install google sign-in using the firebase ios documentation -- firebase.google.com/docs/auth/ios/google-signin -- is a tedious project which requires intermediate skills in objective-c -- only to use flutter. Do you have any idea of how to do that?
1

I had faced a similar issue when i was using firebase, turned out I hadn't included configuration in Info.plist in the iOS module

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.