5

My app is currently being tested by testers via TestFlight. The problem is that they don’t receive any push notifications sent. It’s working on my own device when connecting it to my mac and running the app directly from x-code. I feel like I’ve tried almost everything, from changing certificate from dev to production to recreating a new production APNS certificate and build using a new profile referencing it, etc.

I know this question has been discussed on other topics but I never found the right answer in my case. I can't post images here because I don't have enough reputation but I have relevant screenshots. Any help is welcome :)

Elements to help diagnostic :

  • It’s working on my device when I run the app directly from x-code.
  • The testers are asked properly if they want to authorize push notifications on their devices (at least the first install, after if they want to get asked again they have to do what’s described in Reset push notification settings for app)
  • The registering is working because I can see their devices tokens in the logs (but I have the feeling that the token is always the same, no matter if the app is built with the production or the dev certificate, not sure if it’s normal).
  • I have an APNS Production certificate.
  • I have a distribution profile, with “push notification” enabled. It’s linked with my “full” appID (and not the generic one with “*”).
  • I’m signin the build in release mode with the distribution certificate (not in debug mode), and I’m using the provisionning profile described above (the distribution one, linked with my app id)
  • And when I check in the "binary & entitlements" window just before submitting the build I see the the provisionning profile is correct and that "aps-environment" is set to "production".
  • Server-side : The APNS call is made by using javapns (https://code.google.com/p/javapns/) from a google app engine server. Like I said the notification are correctly received on my own device so I guess this call is working. We have a .p12 file generated from the APNS developpement certificate and a .p12 file from the APNS production certificate, and I've tried to make the call with both and it's not working. The server-side code hasn't change from the previous version and it was working in production with the app on the store. The problem is really focused on testing with testflight.

Thank you all !

Community
  • 1
  • 1
David
  • 51
  • 1
  • 3
  • how do you send the push notification? directly connecting to APNS or trough some third party tool? – alinoz Apr 30 '15 at 09:10
  • I edited my question to add all the explanations about the server-side code. Thank you. – David Apr 30 '15 at 12:12
  • My guess is that the Xcode build is using a development provisioning profile. Have you tried reproducing the bug with an Ad Hoc distribution profile? Also, do you have separate servers for test and production? – Mats Apr 30 '15 at 12:41
  • when you run on your own device try to archive the app and install it using itunes. then try the notification, if you don't get the notification then you have a problem with the certificates you are using on server-side or with the fact that the new device token was not properly registered in your server side. What code dose your javapns receive when it comunicates with the APNS for the case the notification was not send? – alinoz Apr 30 '15 at 13:07

1 Answers1

2

If you followed Ray Wenderlich's tutorial and you made everything work in development mode, the issue most likely comes the fact that you now need to create a new .pem-file for production mode.

So, you need to perform exactly the same steps that you did with the development certificate (i.e. the .p12-file) you downloaded once more with the production certificate which you can obtain in the iOS dev center as well:

sumit
  • 137
  • 9