Open mreis1 opened 5 years ago
@macdonst this issue was classified as a "question", but shouldn't it be treated as a bug? If you need additional information please let me know.
Is someone else having the same problem? In order to receive pushes I had to switch to APN but I lose all the benefits of FCM, such as topics.
Same problem here. Here is my payload:
{ "notification":{ "sound": "default", "title": "title", "body": "body", "someKey" : "someValue" }, "registration_ids": ["fIHl-WqXVJU:APA91bHPhBsYo8ejMGIrhLbUxTtSXLt7CAqV2Z74oxZpZs_a41lfxNLja20F1dkPDTdDGKokgJirnQxXhBoWKOgWB7mygpcl8QPkCwzm5_7X3guUmvFmHpAqLiyrNCsYLHCPdZfSWV5_"], "priority": "high", "content_available": true, "mutable_content": true }
The token is copied from the console after the registration event. No problems on Android.
For a few days I thought I was the only was facing this issue. I think there's something going wrong when the plugin attempts to get the token from the FCM server. This invalidation makes it impossible to receive the push notification on iOS devices.
Same InvalidRegistration here for iOS, any update on this?
I don't know @Divxtaman. For now the issue is classified as a question.
Anyone else having this issue?
We are facing this too in 2 of our applications. Since last few days. Ironic part is it works if we install the apps from stores but not for the one which is in TestFlight. at least existing customers are good. but I can't figure out the reason. as far as code goes we didn't changed anything from the one in the store. So it seems like something is changed in Firebase side. Haven't tried it with APN directly.
That's really weird, but the problem has to be related with something going wrong when this plugin attempts to hit the FCM server. Otherwise I would be able to use a native FCM swift implementation that worked in non production environment. Now we need to try to figure out what's going wrong in this authorization process.
Fixed it. It was the pods
installed it and it worked
pod 'Firebase/Core'
pod 'Firebase/Messaging'
My Pods are installed. Still it doesn't work.
An other related issue had the answer for me: https://github.com/phonegap/phonegap-plugin-push/issues/2644#issuecomment-458858321
Try this in Xcode:
File > Workspace Settings, change Build System to Legacy Build system
Expected Behaviour
After PushNotification.init() token is received in the 'registration' event handler. This token should be valid if we try to send a push to this device.
Actual Behaviour
The token received is returned as InvalidRegistration.
Reproduce Scenario (including but not limited to)
1) Push to token obtained in Swift app using FCM (same bundle id than cordova app)
2) Push to token obtained in cordova's app using FCM (same bundle id)
3) The push now fails
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
IPhone 6 - iOS 11.4
Cordova CLI version and cordova platform version
Plugin version
Tested in both
Sample Push Data Payload
Visible in the above image.
Initialization code
Update: I forgot to add the init code
Additional Information:
After the PushNotification.init() invalidate my token, I decided to open xcode and flash once again my native swift iOS app to the device. Here's the log printed out on XCODE console.
The swift module used here is part of FCM's quickstart-ios available on github.