-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Plugin assumes that if a GCM_SENDER_ID exists then we want to use FCM for notifications #1770
Comments
@SeeWhat really good point. There should be an option in init to indicate to whether or not to use FCM. Thanks for the bug report. |
@SeeWhat when I remove |
The error I mentioned (repeated below) is coming from Firebase itself. So you must have the
It's a bit of a pain getting
|
This needs to go into the documentation somewhere for those people migrating from 1.x to 2.x. This broke my iOS APNS setup because it causes iOS to default to FCM. The Info plist is used for other firebase features as well, so I was not aware this was having an effect on my push notifications. |
Hi |
Expected Behaviour
Shouldn't assume that because I have a GoogleService-Info.plist file that I want this plugin to use FCM for notifications.
Actual Behaviour
Forced to use FCM as the GoogleService-Info.plist file contains the GCM_SENDER_ID which can't be removed due to another plugin using Firebase.
It would be good if there was a configuration option to control if FCM should be used if possible.
The registration event would also need to indicate if the token being provided is an FCM or APNS token.
Steps to Reproduce
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
Cordova CLI version and cordova platform version
Plugin version
Code related to issue
https://github.com/phonegap/phonegap-plugin-push/blob/master/src/ios/PushPlugin.m#L318-L329
Logs taken while reproducing problem
Without GCM_SENDER_ID in the GoogleService-Info.plist file the Firebase SDK log the below error
With the GCM_SENDER_ID in the file, The PushPlugin logs
The text was updated successfully, but these errors were encountered: