Open brunojs02 opened 5 years ago
Probably related with this issue where I actually show that integrations of this plugin with iOS that rely on Google's FCM for push messages are not working. Token's returned by the plugin are invalidated and when we attempt to send the push to the device, the first time we get "InvalidRegistration" and all following attempts will return "NotRegistered".
By the away, if you use APN, this plugin will work, and you will not have the issue, but you will loose the ability to push to topics since this is a FCM feature.
How u send to apns with token generated?
As I said this plugin allows you to work with APNs or with FCM. It depends on how you setup the plugin. If you decide to use APN, the on('registration', (token)=>) will be called with the APN token.
I solve my issue removing application key from firebase and upload .p12 to dev and prod :)
If I understand it right, FCM is working with your iOS device?
Yeah, it's working, but until now, i dont understand the reason that .p12 work for dev and prod, but .p8 dont. Ps: the warnings messages still appears when i install the app by xcode.
I stop using .p12 keys. Instead, I use the APN Key that can be obtained at https://developer.apple.com. Then I imported that key on my FCM project.
I had done this too, but this is not working, I do not know why, so I imported the .p12 files to the firebase and started working normally.
I have the same issue, but to me not working with .p8 or dev/prod certificates. Do you found any solution ?
Try this in Xcode:
File > Workspace Settings, change Build System to Legacy Build system
I had the same problem. As @brunojs02 suggested, i removed the .p8 and switched to the .p12 certificates and now it works
Try this in Xcode:
File > Workspace Settings, change Build System to Legacy Build system
I had the same problem. This suggestion works
Expected Behaviour
Notifications work in iOS like android devices.
Actual Behaviour
The App is connected to Firebase(I can see on analytics), but the message don't arrive, in the first time that I send a payload to firebase, I get a error status 500, and in the second time I get the error message 'identifier not found' (or something like this).. Ps: this is for development, on production always I get error status 500.
Reproduce Scenario (including but not limited to)
ionic Cordova platform add iOS ionic Cordova prepare iOS --prod open the Xcode project and change the system build, like in issue #2518. and run on my device. PS: my certs to prod and dev for provision and notifications service are on keychains and a configured a key on apple.dev account and upload to firebase.
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
iOS: 11.4.1
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
iPad Air 2
Cordova CLI version and cordova platform version
Plugin version
Sample Push Data Payload
Message.builder().setToken("registrationId").setApnsConfig(ApnsConfig.builder().setAps(Aps.builder().setAlert("Message teste").build()).build());
Firebase admin: 5.9.0
Sample Code that illustrates the problem
const options: PushOptions = { android: { icon: 'notificacao', iconColor: '#FF9C12' }, ios: { alert: 'true', badge: true, sound: 'true' }
Logs taken while reproducing problem
[FIRApp configure];
(FirebaseApp.configure()
in Swift) to your application initialization. Read more: https://goo.gl/ctyzm8.