I've been few days stuck with this problem (again!). FCM push notification works fine on Android and on my current live/prd version of the app (still running and working well). But recently I upgraded to Cordova 7.1.0, platform iOS 4.4.0 and re-add all the plugins for my next update of the app.
Everything works well except this FCM on iOS!!!! Not working for all version and all iOS devices. I had this problem before, but it was an easy fix (missing GoogleService-Info.plist file on FCM plugin). But currently this problem appeared again and I really have no idea how to fix it. Been going through lots of questions and tried lots of things.
Steps that I have done:
- Remove and re-add FCM plugin as well as platform iOS
- Check and make sure the file not empty for GoogleService-Info.plist files on: Cordova-plugin-fcm > src > ios; platform > ios > [myproject] > resources; platform > ios > [myproject] > resources > resources
- Test sending push notifications from firebase console. It says completed and sent! but not receiving on iOS (received on Android)
- Turn on and off and on again in Xcode capabilities: push notifications, as well as background modes > remote notifications, and keychain sharing
- Check [myproject].entitlements > APS with value Development is there
- Add FirebaseAppDelegateProxyEnabled value NO on info.plist
- Check the validity of my APNS key and certificate through:
openssl s_client -connect gateway.push.apple.com:2195 -cert pushtry.pem -key pushtry.pem
and return verify code 0(OK) at the end - Trying to test APNS on http://pushtry.com but said Arvind APNS Connection Failed: 0 as result. When I try to send FCM push from the same website, it is sent successfully (received on Android, not on iOS) Anyone know how to run this properly and what is the result should be?
- Check all the provisioning profiles and certificates and make sure they are not expired yet. And I do have the Apple Push Service for both development and production.
- Double check the bundle ID and APP ID to match with the Firebase console settings.
I run the app from Xcode 10 with multiple iPhone ranging from iOS 11 to 12. All cannot receive the push notifications. But when I download my app from play store, it is still receiving push notification. the FCM plugin version is cordova-plugin-fcm 2.1.2.
Please help! What should I do and check beside all of those mentioned above? I need to update the app soon. But I am scared after the update, all the live version with the newly updated app will not be receiving push notifications, which is very crucial for our app!
I am suspecting the mismatch of the provisioning profile with code signing identity, but I have never changed them for 1 year+ already (only update and recreate the certificate once it is expired). I do not think it is the problem from FCM because it sent out the push notification and no problem on android. But then again, the last update of my app was two months ago. After that I rarely check on iPhone (especially push notification) because I don't have one. Always doing my dev with Android phone. So maybe I missed out something? Advice and solution, please?
All version of my app on my development (my local MAC) is not working now. Even if I try to build and run the older version of my app. The push notifications are not being received. So maybe my cordova or iOS problem.