How to make my version of the debugging app receive product release notifications on iOS?

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

How to check notifications on my debug device and debug builds using the same production certificate?

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

+6
source share
3 answers

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

When your application is ready to be submitted, you create a special provisioning profile that identifies the application identifier that matches one or more of your applications, a set of test devices, and one distribution certificate.

Here is an image illustrating how a provisioning profile works:

enter image description here

+3
source

If you create your application with a development profile, you will receive a device token for the sandbox that is valid only in the push sandbox environment (using the push push server and Sandbox test window).

If you create your application with a product preparation profile or AdHoc, you will receive a production device marker that is valid only in a production launch environment (using a production push server and a production certificate).

+7
source

A little late for the party, but even when all the other answers are correct, they do not answer your question.

Answer: You cannot test production APNS using the debug build.

Debug builds will always receive APNS tokens for the sandbox.

A release (ad-hoc or application store) will always receive APNS tokens.

The logic is to debug an application that needs to be signed using a debug certificate and provisioning profile. This provisioning profile determines which APNS endpoint your application connects to.

+2
source

Source: https://habr.com/ru/post/971539/


All Articles