提交用于 beta 测试的二进制文件:“缺少推送通知权利" [英] Submitting a binary for beta testing: "Missing Push Notification Entitlement"

查看:19
本文介绍了提交用于 beta 测试的二进制文件:“缺少推送通知权利"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前使用的是 Xcode 6.4.在我的 Member Center 站点中,我拥有某个 App ID 的开发和生产 APNS 证书,并且此类 App ID 显示时为两种环境都启用了推送通知.我还创建了几个配置文件:一个用于在其启用的服务中关联该 App ID 和推送通知的开发,另一个用于同一 App ID 的临时分发以及启用推送通知的服务.

I'm currently using Xcode 6.4. In my Member Center site, I have both development and production APNS certificates for a certain App ID, and such App ID appears with Push Notifications enabled for both environments. I also created a couple of provisioning profiles: one for development with that App ID associated and Push Notifications in their enabled services, and another one for ad Hoc distribution for the same App ID and also with Push Notifications enabled services.

我可以在 Xcode > Preferences > Accounts > Details list of provisioning Profiles in my account 中看到两个配置文件,但根据显示的权利图标,推送通知权利似乎没有出现在那里.

I can see both provisioning profiles in Xcode > Preferences > Accounts > Details list of provisioning profiles in my account, but the Push Notifications entitlement doesn't seem to appear there according to the entitlements icons displayed.

此外,当我存档应用程序并想要导出以进行临时部署时,Xcode 不允许我选择某个配置文件来签署应用程序,即使我已经在目标的构建设置 > 代码签名 > 配置中设置了它轮廓.该对话框中的应用程序还列出了已归档应用程序的 4 项权利,但没有一项是aps".

Moreover, when I archive the app and want to export for ad Hoc deployment, Xcode doesn't allow me to choose a certain provisioning profile to sign the app, even I had set it in target's Build Settings > Code Signing > Provisioning Profile. The app in that dialog also lists 4 entitlements for the archived app, but none is "aps".

无论如何,我通过使用 Xcode 设置的配置导出了应用程序,并且不允许我更改(XC Ad Hoc:*)并将其发送到 iTunes Connect.然后我收到一封电子邮件说:

Anyway, I exported the app by using the provisioning that Xcode set and doesn't allow me to change (XC Ad Hoc: *) and sent it to iTunes Connect. Then I received an email saying:

缺少推送通知权利 - 您的应用似乎包括用于注册 Apple 推送通知服务的 API,但应用签名的权利不包括aps-environment"权利.如果您的应用使用 Apple 推送通知服务,请确保您的 App ID 在配置门户中启用推送通知,并在使用包含aps-environment"权利的分发配置配置文件签署您的应用后重新提交.

Missing Push Notification Entitlement - Your app appears to include API used to register with the Apple Push Notification service, but the app signature's entitlements do not include the "aps-environment" entitlement. If your app uses the Apple Push Notification service, make sure your App ID is enabled for Push Notification in the Provisioning Portal, and resubmit after signing your app with a Distribution provisioning profile that includes the "aps-environment" entitlement.

会发生什么?在我的 Member Center 中,我为推送通知启用了 App ID,并且我有相应的证书和配置文件.我刷新了配置文件两次,但没有结果.我可能会错过什么?我真的需要帮助解决这个问题.

What could be happening? In my Member Center I have App ID enabled for push notifications, and I have the corresponding certificates and provisioning profiles. I refreshed the provisioning profiles twice with no result. What could I be mising? I really need help with this issue.

提前致谢

如果我在文本编辑器中打开配置文件,它实际上包含以下行:

If I open the provisioning profile in a text editor, it actually contains the lines:

<key>aps-environment</key>
<string>production</string>

那为什么这个授权会列在 Xcode > Preferences > Accounts 图标中?

Then why is this entitlement listed in Xcode > Preferences > Accounts icons of the provisioning?

编辑 2: 我应该将 Entitlements.plist 文件添加到我的项目中吗?我在哪里可以找到有关的文档?

EDIT 2: Should I add an Entitlements.plist file to my project? Where could I find documentation regarding that?

推荐答案

过去 2 周我都在处理同样的问题.终于让它工作了.问题可能是 Xcode 6.4 中的错误.Xcode 使用不同的配置文件来签署应用程序(通配符XC:*"),该应用程序恰好没有aps-environment"权利,即使我在构建设置"中正确选择了我的配置文件.所以为了解决这个问题,我不得不通过深圳构建和分发.

I spent the last 2 weeks dealing with the same problem. And finally got it working. The problem is probably a bug in Xcode 6.4. Xcode was using a different Provisioning Profile to sign the App (the wildcard 'XC: *') which happens to not have the 'aps-environment' entitlement, even though I was selecting my provisioning profiles correctly in 'Build Settings' as you. So to workaround this I had to build and distribute via Shenzhen.

希望这对您也有帮助.

这篇关于提交用于 beta 测试的二进制文件:“缺少推送通知权利"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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