Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call configure only if defaultApp is null #406

Closed
wants to merge 1 commit into from

Conversation

jcesarmobile
Copy link

In some cases the app might be already configured and calling configure twice crash the app with this error

*** Terminating app due to uncaught exception 'com.firebase.core', reason: 'Default app has already been configured.

Closes #58

In some cases the app might be already configured and calling configure twice crash the app with this error

`*** Terminating app due to uncaught exception 'com.firebase.core', reason: 'Default app has already been configured.`

Closes fechanique#58
@dimitri320
Copy link

I'm getting this error, how can I fix it???

@jcesarmobile
Copy link
Author

You can apply this change to your plugin, or wait until it's merged.

@dimitri320
Copy link

@jcesarmobile how can I apply this change to my plugin? Thanks!

@sahyun1
Copy link

sahyun1 commented May 21, 2018

@dimitri320 like this
cordova plugin add cordova-plugin-fcm@https://github.com/fechanique/cordova-plugin-fcm.git#0efe2150e593f1f30079e8bcd2a26cab6502e64f --save

@sahyun1
Copy link

sahyun1 commented May 22, 2018

I've tried this and the error is gone but actually message doesn't come through on ios.

@ChristianOrrala
Copy link

@sahyun1 for now I'm using @ionic-native/firebase with angular/angularfire2 and it's works perfectly on android and iOs.

@sahyun1
Copy link

sahyun1 commented Jun 22, 2018

@ChristianOrrala
cool, so both analytics and messaging work?

@ChristianOrrala
Copy link

ChristianOrrala commented Jun 22, 2018

@sahyun1 Yes, actually with that combination I'm using Auth, Firestorage, Analytics and FCM.

@saberprashant
Copy link

Hi @sahyun1 , did you find a way to get the push notifications on iOS after solving this issue ?:
Call configure only if defaultApp is null

As you said, after doing this:
if([FIRApp defaultApp] == nil) { [FIRApp configure]; }
I am facing the same problem where my notifications just got stopped on iOS. Please help :)

PS: I am using cordova-plugin-fcm-with-dependecy-updated with cordova-plugin-firebase-analytics

@sahyun1
Copy link

sahyun1 commented May 5, 2019

@saberprashant
I've been using firebase plugin
https://ionicframework.com/docs/native/firebase

authentication, messaging and analytics work all fine as @ChristianOrrala suggested.

@jcesarmobile jcesarmobile deleted the patch-1 branch November 8, 2019 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iOS: Default app has already been configured.
6 participants