iOS FCM push notifications not received in TestFlight

Viewed 1145

I have an issue with FCM and TestFlight. I have an app which is written via Objective C. It uses push notification service via Firebase. I use APNs key instead of certificates.

The issue is when I run my app in debug and in release mode via Xcode I get push notifications. When I sign app with distribution profile and send it to TestFlight and install it via TestFlight on same device push notifications not received.

We are using php server for the app. And push notifications are sent from that server via firebase. I have all the settings in AppDelegate file as it is stated in Firebase SDK docs. So all proper delegates are set and firapp configure called and so on like here. https://firebase.google.com/docs/cloud-messaging/ios/first-message Also I've checked entitlements file that APS-environment is set to Production when sending to TestFlight.

I've tried to set type of device token in didRegisterForRemoteNotificationsWithDeviceToken via [[FIRMessaging messaging] setAPNSToken: type:] to sandbox or prod whether it is debug or release mode of schema. Also I've using this code instead of that now [FIRMessaging messaging].APNSToken = deviceToken. But neither of the options work in TestFlight.

Our back-end dev says that on server push notifications are sent properly. So I suppose that it may be something related to device token.

Also I've update Firebase pods recently form version 3 to version 6. May be firebase lib on server should be updated as well?

Do you know what the issue can be? Any help is appreciated.

1 Answers

Update. I've found that this issue has began after updating firebase ios lib not from 3 to 6 version but from version 6.18 to 6.31.1. So my issue was bug stated in issue #6553 on official GitHub of Firebase iOS SDK. This bug was fixed in version 7.0.0. And after updating my issue was solved. https://github.com/firebase/firebase-ios-sdk/issues/6553

Related