发布 iOS10/Xcode 8.0 “缺少推送通知权利"为 iTunes Store 构建后出错 [英] Post iOS10 / Xcode 8.0 "Missing Push Notification Entitlement" error after build for iTunes Store

查看:64
本文介绍了发布 iOS10/Xcode 8.0 “缺少推送通知权利"为 iTunes Store 构建后出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在为 iTunes 商店构建并提交存档时,我收到来自苹果的此错误:

Whilst building for iTunes store and submitting the archive, I receive this error from apple:

亲爱的开发者:

我们发现您最近的交货有一个或多个问题XXXXXXXXX".您的交付成功,但您可能希望更正您下次交付时会遇到以下问题:

We have discovered one or more issues with your recent delivery for "XXXXXXXXX". Your delivery was successful, but you may wish to correct the following issues in your next delivery:

缺少推送通知权利 - 您的应用包含用于Apple 的 Push Notification 服务,但 aps-environment 权利应用程序的签名中缺少.要解决此问题,请确保您的为 Provisioning Portal 中的推送通知启用了 App ID.然后,使用分发配置文件签署您的应用程序,该配置文件包括 aps-environment 权利.这将创建正确的签名,然后您可以重新提交您的应用程序.请参阅供应和开发"在本地和推送通知编程指南中更多信息.如果您的应用不使用 Apple 推送通知服务,无需任何操作.您可以从未来删除 API提交以停止此警告.如果您使用第三方框架,您可能需要联系开发人员以获取有关删除API.

Missing Push Notification Entitlement - Your app includes an API for Apple's Push Notification service, but the aps-environment entitlement is missing from the app's signature. To resolve this, make sure your App ID is enabled for push notification in the Provisioning Portal. Then, sign your app with a distribution provisioning profile that includes the aps-environment entitlement. This will create the correct signature, and you can resubmit your app. See "Provisioning and Development" in the Local and Push Notification Programming Guide for more information. If your app does not use the Apple Push Notification service, no action is required. You may remove the API from future submissions to stop this warning. If you use a third-party framework, you may need to contact the developer for information on removing the API.

纠正问题后,您可以使用 Xcode 或应用程序加载程序将新的二进制文件上传到 iTunes Connect.

After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to iTunes Connect.

问候,

App Store 团队

The App Store team

我们尝试按照论坛中的建议重新创建配置文件,但仍然收到相同的电子邮件.

We tried recreating the provisioning profiles as suggested in the forums but still we keep getting the same email.

在功能"选项卡下打开内置的 .xcodeproj 时,推送通知设置似乎已关闭.

Whilst opening the built .xcodeproj under the "Capabilities" tab the push notification settings seems to be turned off.

推荐答案

尝试在项目的根目录中创建一个 Entitlements.plist 文件.

Try creating an Entitlements.plist file in the root of your project.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/
DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>aps-environment</key>
    <string>production</string> <!-- Either development or production -->
  </dict>
</plist>

所以,在 Xcode 8 之前,Xcode 会读取您的配置文件,如果配置文件中设置了推送权限,则会自动为您将权限添加到构建中.从 Xcode 8 开始,情况不再如此,您必须特别指定您使用的权利.

SO, before Xcode 8, Xcode would read your provisioning profile and if the profile had the push entitlement set in it, would automagically add the entitlement to the build for you. Since Xcode 8, this is no longer the case, and you must specifically specify the entitlements you use.

这篇关于发布 iOS10/Xcode 8.0 “缺少推送通知权利"为 iTunes Store 构建后出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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