bug: Firebase Messaging not initialized
See original GitHub issuePlugin(s):
Platform(s):
- ios
Current behavior: I added the plugin to my capacitor app, set up push notifications and background modes. Added snippets as described to AppDelegate.swift and FirebaseAppDelegateProxyEnabled to Info.plist. Also added GoogleService-Info.plist to the xcode project.
After building and running the app on a mobile device, I see these errors in xcode logs:
[FirebaseCore][I-COR000003] The default Firebase app has not yet been configured. Add `FirebaseApp.configure()` to your application initialization. This can be done in in the App Delegate's application(_:didFinishLaunchingWithOptions:)` (or the `@main` struct's initializer in SwiftUI).
[FirebaseMessaging][I-FCM002023] The object <CapacitorFirebaseMessaging.FirebaseMessaging: 0x282da5380> does not respond to -messaging:didReceiveRegistrationToken:. Please implement -messaging:didReceiveRegistrationToken: to be provided with an FCM token.
Expected behavior: No warnings of uninitialized Firebase components in xcode log.
Steps to reproduce: build and run the app.
Related code:
Other information:
Capacitor doctor:
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 3.6.0
@capacitor/core: 3.6.0
@capacitor/android: 3.6.0
@capacitor/ios: 3.6.0
Installed Dependencies:
@capacitor/cli: 3.5.1
@capacitor/core: 3.6.0
@capacitor/android: 3.6.0
@capacitor/ios: 3.6.0
[success] iOS looking great! 👌
[success] Android looking great! 👌
Issue Analytics
- State:
- Created a year ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
android - FirebaseApp is not initialized - Stack Overflow
You can try to disconnect the project from the Firebase and reconnect again the project to Firebase. In my case is like this,...
Read more >Troubleshoot initialization options | Firebase - Google
Your application may be using an incomplete or erroneous google-services.json configuration file ; or your app is programmatically initializing Firebase without ...
Read more >Firebase Cloud Messaging Not Work - Niotron Community
Hello Niotron team we faced Firebase Cloud Messaging issue at very long time till the issue present and still this component not work...
Read more >[firebase_auth][firebase_messaging] Firebase Dart ... - GitHub
A clean flutter (2.8.1) project won't initialise run correctly if firebase_auth and firebase_messaging are installed with iOS push notifications ...
Read more >[Solved] No Firebase App '[DEFAULT]' has been created Error
While using Firebase services in Flutter, you may get ʺNo Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp()ʺ Error in Flutter.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Now I am messing around with the code locally, but no luck so far. I even put it in the launch method as suggested from you and the firebase docs:
And I still get this warning. So something is wrong with my local test app. I will dig a little deeper.
Ok, I will prepare a testrepo. For Android it works as expected, only iOS is affected.