Google Firebase Push Notifications for iOS are not working in production environment
I’m using Google Firebase Cloud Messaging API (FCM) to send push notifications to my iOS app.
I could get push-notifications working successfully when I test the app on a device with Development provisioning profiles + development push notification(sandbox) certificates.
However I’m unable to get it working on production environment. I made an ad-hoc build with correct production provisioning profiles and production push notification certificates. And synced an IPA file to a device via iTunes for testing (not directly from xcode). Still I can’t receive push notifications from firebase console.
I have uploaded correct development and production certificates (with private keys) to firebase as well. I’ve double checked every possible step that could go wrong but, still can’t find the issue. Is there a way to troubleshoot this issue? Or isn’t it possible to get production environment notifications to an AdHoc build?
- Silent push notifications only delivered if device is charging and/or app is foreground
- Change push notification sound
- Open view controller when receiving remote Push Notification
- Apple Push Notification Registration & Device Token Receive clarification?
- registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later
- How long does a push notification sit in queue before being removed?
4 Solutions Collect From Internet About “Google Firebase Push Notifications for iOS are not working in production environment”
I had the same issue. Apparently there is an error in the Firebase documentation. When you exporting the APN certificate for production from your keychain to the .p12 file you have to select the actual certificate, not the private key.
Make sure you upload to the Firebase console this .p12 file in the Cloud Messaging APN certificate settings.
Had same issue. Finally got it working by:
Using the correct
TargetBuild Settings as mentioned in This link.
And revoking the existing push certificates and creating a new one completely, and then uploading the new certificate’s
.p12file to the Firebase Console.
What fixed my issue was using the new Authentication Keys method instead of the old p12 files. You can read more in the Firebase documentation, just follow their steps and you should be fine.
Finally work for me…
Here my steps:
1 – Make sure to Enable FirebaseAppDelegateProxyEnabled to YES in the info.plist
2- Revoke your certificate (APNS develop and distribution) and create a news ones
3 – NOTE: there is an error in the Firebase documentation. When you exporting the APN certificate for production from your keychain to the .p12 file you have to select the actual certificate, not the private key.
4 – Make sure you upload to the Firebase console this .p12 file in the Cloud Messaging APN certificate settings.
5- Send remote notification with Firebase Console.
Thanks to all..!
- Fading in and out UIButton in view
- CoreBluetooth didDiscoverPeripheral not being called in Swift
- Method returning value from asynchronous block with FacebookSDK
- Localized project with several targets with localized app names
- How do I delete all objects from my persistent store in Core Data?
- How to add small red dot in UITabBarItem
- Swift adding custom keyboard or numpad in app
- NSManagedObject setter giving me : unrecognized selector sent to instance
- swift 3 calling function with completion closure in return
- pod install failed with error: Library (from `../`)` required by `Podfile` when pod install in iOS
- iOS framework/library for presenting Powerpoint slides?
- Multiple versions of iTunesArtwork in one project?
- How can I save a html file with external resources using AFNetworking?
- Changing date format on iOS
- How to bring UIBezierPath to the back of a MKAnnotation object?