Why don't push notifications work on testflight?

I tested push notifications as a developer account and it worked. But when I tried to put it on TestFlight for testing testers, it did not show a push notification, but the data was received correctly. So is there a kind of certificate that I need to create for TestFlight?

+71
ios push-notification testflight apple-push-notifications
Jun 04
source share
8 answers

But when I tried to put it on TestFlight for testers to check it, it did not show a push notification, but the data was received correctly.

This sentence is confusing. If you did not receive a push notification, what data is correctly received?

In any case, if I remember correctly, for TestFlight you use the AdHoc provisioning profile, which works with the push workspace. Therefore, you will need a production click certificate to click on the devices that installed the application through TestFlight. Also, don't forget that development tokens are different from production device tokens, so make sure you use the correct tokens.

+80
Jun 04 '14 at 18:47
source share
  1. You need to use a production certificate to build testflight.
  2. You must also remove the sanbox (sandbox mode) from the push notification URL in the push send script.
+40
Dec 10 '14 at 18:23
source share

If you are using Firebase, you need to add:

  • TestFlight:

    -(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { [[FIRInstanceID instanceID] setAPNSToken:deviceToken type:FIRInstanceIDAPNSTokenTypeSandbox]; } 
  • Production:

     -(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { [[FIRInstanceID instanceID] setAPNSToken:deviceToken type:FIRInstanceIDAPNSTokenTypeProd]; } 
+12
Sep 13 '16 at 12:00
source share

For TestFlight use

  1. Production certificate
  2. "gateway.push.apple.com" on the server (end job)
+6
Feb 20 '18 at 17:25
source share

if you used GCM. In developing: -

 _registrationOptions = @{kGGLInstanceIDRegisterAPNSOption:deviceToken, kGGLInstanceIDAPNSServerTypeSandboxOption:@YES}; 

In distribution: -

 _registrationOptions = @{kGGLInstanceIDRegisterAPNSOption:deviceToken, kGGLInstanceIDAPNSServerTypeSandboxOption:@NO}; 
+5
Apr 05 '16 at 10:59
source share

We need two certificates for sending notifications: one for development and one for production. In my case, I use the PushSharp solution to send notifications.

This is for development:

 var config = new ApnsConfiguration(ApnsConfiguration.ApnsServerEnvironment.Sandbox, "development.p12", "password"); var broker = new ApnsServiceBroker(config); 

This is for production:

 var config = new ApnsConfiguration(ApnsConfiguration.ApnsServerEnvironment.Production, "production.p12", "password"); var broker = new ApnsServiceBroker(config); 
+1
Aug 2 '17 at 8:21 on
source share

For some, Python apns is used ( https://github.com/djacobs/PyAPNs ):

When creating an APNS object, such apns = APNs(cert_file="cert.pem", key_file="key.pem") . You need to add another use_sandbox parameter. This will be apns = APNs(use_sandbox=False, cert_file="cert.pem", key_file="key.pem") .

Good coding.

+1
Apr 23 '19 at 9:28
source share

Make sure you set FirebaseAppDelegateProxyEnabled to YES in the info.plist file.

0
Aug 15 '19 at 6:52
source share



All Articles