Xcode 8 APS 环境权利不会设置为生产 [英] Xcode 8 APS Environment Entitlement won't set to production

查看:34
本文介绍了Xcode 8 APS 环境权利不会设置为生产的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序有推送通知.
我去提交一个新的应用程序更新,但遇到了未设置 APS 环境的错误.
我遇到了修复问题并创建了授权文件将 APS 环境设置为开发.

要提交应用程序,我显然希望将此设置为生产环境.我将值更改为生产并继续存档应用程序以供提交.
它在推送通知的功能部分引发错误,最后一个将推送通知权利添加到您的权利文件"为红色.

因此,当我遇到修复问题时,它会将 APS 环境的值更改为开发.
我遇到了检查配置文件并查找 APS 环境属性的建议.
我完成了整个过程存档并选择上传到 App Store".

当我最终到达摘要时,我单击了附加到二进制文件和权利的配置文件.
我在文本编辑器中打开了配置文件,然后查找了 APS 环境属性.
我确实找到了该属性,并且在配置文件中将其设置为生产.
我决定尝试另一个建议,即重新创建分发配置文件.
我做到了制作一个新的,该解决方案也不起作用.

据我所知,APS 环境属性基于您的配置文件中的值.

I have push notifications working on my app.
I went to go submit a new app update and I ran into an error with APS environment not being set.
I hit fix issue and it created the entitlement file with APS environment set to development.

To submit the app I obviously want this set to production. I change the value to production and proceed to archive the app for submission.
It throws an error in the capabilities section for push notifications with the last past "Add the Push Notifications entitlement to your entitlements file" being red.

So when I hit fix issue, it then changes the value of APS environment to development.
I came across a suggestion to inspect the provisioning profile and look for the APS environment property.
I went through the process of archiving and selected "Upload to App Store".

When I finally reached the summary, I clicked on the provisioning profile attached to the binary and entitlements.
I open the provisioning profile in a text editor and looked for the APS environment property.
I did find the property and it is set to production in the provision profile.
I decided to try another suggestion, which was to recreate the distribution provisioning profile.
I did make a new one and that solution doesn't work either.

From what I understand, the APS environment property is based on the value in your provisioning profile.

任何帮助将不胜感激.谢谢.

Any help would be appreciated. Thanks.

推荐答案

关闭 Capabilities 中的推送通知",然后重新构建.

更新

经过数小时的调试,无论您如何配置 Xcode8 或使用任何方案(调试或生产)构建,您总会从 APNS 获得用于开发环境的 deviceToken.我试图在我的测试设备上删除我的应用程序,该应用程序直接从 Xcode8.1 构建并使用生产方案.然后我从 AppStore 安装了我的应用程序,该应用程序是两周前从 Xcode8.1 存档的相同配置,AppStore 版本的通知服务工作正常,这证明 Xcode 确实为生产环境设置了正确的授权值.因此,解决方案是:保留权利文件,并保持功能"中的推送通知"开关,执行 Xcode 要求的任何修复.希望这对你有帮助.

After hours of debugging, no matter how you configure Xcode8 or build with whatever scheme(debug or production), you will always get a deviceToken for development environment from APNS. I tried to remove my app on my test device which build directly from Xcode8.1 with production scheme. Then I installed my app from AppStore, which was archived from Xcode8.1 with same configuration two weeks ago, the AppStore version's notification service works fine, which proves that Xcode did set the right entitlement value for production environment. So, the solution is: leave the entitlements file alone, and keep "Push Notifications" switch on in Capabilities, do any fixes Xcode asked for. Hope this would help you.

这篇关于Xcode 8 APS 环境权利不会设置为生产的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆