I have a flutter app that i am trying to get Firebase cloud messaging to work on but for some reason it refuses to work when deploying to test flight.
If i run in debug mode through VSCode everything works as it should but as soon as i run flutter build ios and deploy to test flight everything breaks.
I have tried a multitude of solutions over the past couple of days including:
Removing and re-adding all certs & provisioning profiles
changing
<key>FirebaseAppDelegateProxyEnabled</key><false/>to<key>FirebaseAppDelegateProxyEnabled</key><string>0<string/>AND to<key>FirebaseAppDelegateProxyEnabled</key><string>NO<string/>trying to force the APNS token to be a production token by adding this to
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { #if DEVELOPMENT //Develop Messaging.messaging().setAPNSToken(deviceToken as Data, type: .sandbox) #else //Production Messaging.messaging().setAPNSToken(deviceToken as Data, type: .prod) #endif }
I have also tried doing different combinations of the above in the hope that one of the solutions would work in tandem with each other.
if anyone can shed some light on why this might be happening i would be extremely grateful!