Firebase push notifications not working on TestFlight/adHoc release
Asked Answered
W

2

3

I developed an app with push notifications, I uploaded it to the AppStore and everything worked fine, notifications did arrive. I now have updated the app to open an url when users taps on the notification. While testing in debug mode with device connected through cable everything works fine.

The problem is that if I release the app through TestFlight (setting FIRInstanceIDAPNSTokenType.Prod), the device will not receive any notification.

I have been struggling for a couple of days, I thought there was a certificate problem, so I reset development and release certificates and also updated the firebase .p12 certificates.

I am developing under Xcode 7.3.1 using swift 2.

Did I miss something?

Thank you

Wrennie answered 14/12, 2016 at 10:44 Comment(1)
I'm facing the same issue at the moment let me know if something worksMerv
T
13

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..!

Totality answered 24/1, 2017 at 14:40 Comment(0)
A
0

Try to turn on and on cellular data by tapping Settings > General > Cellular.

Ally answered 16/12, 2016 at 4:5 Comment(7)
Unfortunately this didn't work, thanks anyway. I now updated the app to swift 3 and Xcode 8.2 but the problem is still thereWrennie
have you add .p12 for product to firebase?Ally
yes, i uploaded both development and production certificates in .p12 formatWrennie
have you change type in your code from sanb to prod in config?Ally
yes, I have always used .prod for testing with TestFlight. In the last hour, I uploaded a TestFlight build with .sandbox for testing purpose and now notifications are arriving but only on one of my devicesWrennie
Are you talking about tokenType or scheme build configuration?Wrennie
you can try to follow: raywenderlich.com/123862/push-notifications-tutorialAlly

© 2022 - 2024 — McMap. All rights reserved.