且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

推送通知适用于 Ad Hoc,但不适用于从 Apple 商店下载

更新时间:2023-02-26 21:27:42

请确保您已创建生产应用 ID 并在其上启用推送通知.然后为该应用程序创建配置文件.下载并使用文本编辑器打开文件,以确保配置文件包含此键和值:

Be sure you've created your production App ID and have enable push notifications upon it. Then create the provisioning profile for that app. Download and open the file with a text editor to MUST make sure that the profile contains this key and value:

aps-环境生产

如果没有,那么在生成配置文件之前,请确保您确实为生产推送启用了应用 ID.

If not, then make sure you really have enabled the app ID for production push before you generated your provisioning profile.

完成构建后,您可以检查最终构建以验证它是否具有 aps-environment 权利(您正在内部要求"下寻找 aps-environment 代码签名权利):

After you make your build, you can check the final build to verify it has the aps-environment entitlement (you're looking for the aps-environment code signing entitlement under "Internal requirements):

codesign -dvvvv --entitlements - MyCoolApp.app

codesign -dvvvv --entitlements - MyCoolApp.app