Daibaku
Daibaku

Reputation: 12616

Flutter Firebase Auth

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.

Upvotes: 3

Views: 1112

Answers (2)

Harshit Kanodia
Harshit Kanodia

Reputation: 31

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

Upvotes: 1

Peter Haddad
Peter Haddad

Reputation: 80934

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

Upvotes: 3

Related Questions