firebase-analytics icon indicating copy to clipboard operation
firebase-analytics copied to clipboard

The default Firebase app has not yet been configured

Open tiagoantunesp opened this issue 5 years ago • 3 comments

When I run my app in IOS, I have the following error:

The default Firebase app has not yet been configured. Add [FIRApp configure]; (FirebaseApp.configure() in Swift) to your application initialization.

The plugin.swift code:

    public override func load() {
        if FirebaseApp.app() == nil {
            FirebaseApp.configure()
        }
    }

tiagoantunesp avatar Feb 26 '21 15:02 tiagoantunesp

Theoretically you don't have to do any Code in the iOS version of the app, did you put your GoogleService-Info.plist in the correct folder?

markxoe avatar Feb 26 '21 16:02 markxoe

Yes, I put the GoogleService-Info.plist. It's plugins code.

tiagoantunesp avatar Feb 26 '21 17:02 tiagoantunesp

What Code are you editing exactly? In my case i used the Push Notifications and added those lines https://github.com/markxoe/ich-bin-eine-biene-mobile/blob/master/ios/App/App/AppDelegate.swift#L14 according to this: https://capacitorjs.com/docs/guides/push-notifications-firebase#add-initialization-code

markxoe avatar Feb 26 '21 17:02 markxoe