Search code examples
iosios7push-notificationxcode5apple-push-notifications

How do I make my debug app version receive production push notifications on iOS?


My server is sporting only one version of sending push notifications, and it has my production (release) push certificate.

How do I test the notifications on my debug device and debug builds, using the same production certificate?

My device is sending the token, but when I attempt to send a real push notification Apple servers return status 8 error, that means that device token is incorrect.


Solution

  • If you want to test your app in production mode, you will need distribute the Distribution version of your app using ad hoc.

    When your application ready for submission, you create an ad hoc provisioning profile specifying an App ID that matches one or more of your apps, a set of test devices, and a single distribution certificate.

    Here is an image to illustrate how the provision profile works:

    enter image description here