Using sandbox APNS on AdHoc Distribution Builds for iOS

旧街凉风 提交于 2019-11-28 18:46:50

问题


I've been reading a bunch of Apple's docs, as well as many other SO questions, but haven't found the answer to this particular question.

I have an existing workflow in place for generating AdHoc Distribution builds for QA members and beta testers. Now that I've added support for push notifications, I'd like those notification paths to be able to be tested as well.

I'm under the impression that Developer builds, signed with a Development provisioning profile, generate tokens that for the sandbox/development APNS environment, and Distribution builds, signed with a Distribution provisioning profile (whether that be destined for AdHoc Distribution OR AppStore Distribution), generate tokens for the production APNS environment. I believe this can be confirmed by opening the different .mobileprovision files, and examining the aps-environment key.

I'd like to know if there's a way to have my AdHoc Distribution builds use the sandbox APNS environment, rather than the production APNS environment.

If I really wanted QA and beta testers to use sandbox APNS, would I have to somehow find a way to allow them to run development builds, rather than distribution builds?

Or are my assumptions about the way things work way off base? (referenced this post and this post)


回答1:


I did found some mention to AdHoc in the context of APNS environments :

Note: There is a separate persistent connection to the push service for each environment. The operating system establishes a persistent connection to the sandbox environment for development builds; ad hoc and distribution builds connect to the production environment.

It's taken from Technical Note TN2265. I guess this note confirms that you can't use the sandbox env in AdHoc distribution.




回答2:


Apple uses a different server for:

  1. Apps signed with a Development profile
  2. All other profiles (AdHoc, InHouse and AppStore). These are going via a Live Server.


来源:https://stackoverflow.com/questions/15240931/using-sandbox-apns-on-adhoc-distribution-builds-for-ios

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