How to test production push notifications?

╄→гoц情女王★ 提交于 2019-11-27 18:07:10
FrediWeber

The production push will work when you download the app from the App Store.

UPDATE:
You can also test the production push with an AdHoc build of the app; see Trinca's answer.

UPDATE:
Now, the easiest solution is to use Apple's TestFlight. (In TestFlight, it is easy to add new remote users, sending them an email invitation, they then download on whatever device they choose.)

Trinca

You can test APNS production environment building an AdHoc version of your App. The app will be using the production certificates and servers and it's purpose is exactly to test BEFORE you send it to AppleStore.

Take a looke at this link: what kind of certificate do I need to test apns using ad-hoc distribution?

Create an Adhoc distribution profile for your app in provisioning profile. Download profile and install. Choose the Adhoc dist profile to code sign your app. Archive ipa and save for adhoc distribution. Copy ipa to your device and test push. It will use production push certs as opposed to development cert. Hope this helps.

If you want to test Push Notification on production environment, you need to take care of few things:-

  1. Production push notifications can only be tested on ipa. You need to create ipa from AdHoc Distribution profile.
  2. You need to replace the Push certificate on your Push API server. APNS Distribution certificate is to be used in this case.
  3. If your API is in DOTNET then you need to change the boolean value to true.
  4. Change Code Signing Identity to distribution on both Projects and Targets

Testing production notifications (without releasing the build) is possible when the app is installed via Apple TestFlight.

This way the production notifications will be delivered to the app.

(If the exactly same build is installed via HockeyApp or by other means, the production notifications won't be delivered.)

Just set the build to internal testing after the build has finished processing in iTunes Connect.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!