Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
460 views
in Technique[技术] by (71.8m points)

iphone - Using sandbox APNS on AdHoc Distribution Builds for iOS

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)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...