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

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

问题描述

我的推送通知正在我的应用程序上工作。
我去提交新的应用程序更新,我遇到了一个错误,APS环境没有设置。
我遇到修复问题,它创建了权利文件将APS环境设置为开发。

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

所以当我遇到修复问题时,它会将APS环境的值更改为开发。
我遇到了检查配置文件并查找APS环境属性的建议。
我经历了这个过程归档并选择上传到App Store。

当我最终到达摘要时,我点击了附加到二进制文件和权利的配置文件。
我在文本编辑器中打开配置文件寻找APS环境属性。
我找到了属性,并在配置文件中设置为生产。
我决定尝试另一个建议,即重新创建配置配置文件。
我做了制作一个新的解决方案也不起作用。< br>
根据我的理解,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天全站免登陆