Quickstart-ios: Push Notification doesn't work on the TestFlight

Created on 23 Nov 2016  路  9Comments  路  Source: firebase/quickstart-ios

I tried your sample code. The push notification works fine under the development environment but it doesn't work when I install the app from TestFlight or from AdHoc.

Here are what I've done:

  1. Correctly download and upload the Push notification Certification (Both Development and Production)
  2. Send notification from Firebase console.(Phone gets notification in the development but don't when the app is install from TestFlight)
  3. The provisioning file is managed by XCode, I can see the push notification is enabled.

I'm so frustrated that I've spent the whole week but not solved this problem.
Please save me! Thank you!

Most helpful comment

Yes I did. I solved the problem by uninstalling debug app and making clean install from TestFlight.

All 9 comments

Do you have the swizzled version enabled? I am wondering if there is an issue with the environment chosen for APNs (sandbox vs production). Do you see anything in the device logs - does the connection to FCM go through OK?

Thanks for your reply! It works fine now. Also I surprisingly found that the APNS service will use cellular network whenever possible.

On iOS, push notifications use the cellular data network whenever possible, even if the device is currently using Wi-Fi for other network activity such as web browsing or email. However, the push service will fall back to Wi-Fi if cellular data service isn't available.
If your iOS device is capable of using the cellular data network, check that it has an active cellular data plan. Turn off Wi-Fi in Settings and see if you can still browse the web with Safari, for example. On the other hand, if the push service is using Wi-Fi, any firewalls between your device or computer and the Internet must allow TCP traffic to and from port 5223.

More detail please see here: https://developer.apple.com/library/prerelease/content/technotes/tn2265/_index.html
Maybe my cellular network causes the APNS failure.

I guess the FCM uses both Wi-Fi and cellular network, that's why sometimes I can receive FCM message but can't receive the push notification when the app is on the background.

Thanks for the info! That's super interesting, I didn't know that about APNs either. @kroikie : one for you debugging checklist!

Hi, it seems I have same problem. I was debugging notifications in xcode with connected iPhone and everything worked fine. I was also able to get body from notification and etc. But then I have uploaded it to Testflight and it stopped working completely. It's not working even in xcode with connected iPhone. I have tried to revoke certificates and make new ones couple of times but it didn't help either. I am sending notifications to all devices so I am not working with tokens and I have set up FirebaseAppDelegateProxyEnabled to YES. Any chance to get this working?

@marekpridal, @adadgio has a point could you confirm if you are using a production cert for your TestFlight app?

Yes I did. I solved the problem by uninstalling debug app and making clean install from TestFlight.

Cool, glad you got it working.

I also solved the problem by uninstalling the debug app and installing it from TestFlight. Thanks all.

Was this page helpful?
0 / 5 - 0 ratings