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

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

问题描述

在构建iTunes商店并提交档案时,我从Apple收到此错误:

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

亲爱的开发人员,

Dear developer,

我们发现您最近的交货有一个或多个问题 "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:

缺少推送通知权利-您的应用程序包含一个API,用于 Apple的Push Notification服务,但aps-environment的权利 该应用程序的签名中缺少该字符.要解决此问题,请确保您的 在预配门户中启用了用于推送通知的应用程序ID. 然后,使用分配配置文件对您的应用进行签名, 包括aps环境权利.这将创建正确的 签名,然后您可以重新提交您的应用.请参阅配置和 本地和推送通知编程指南中的开发" 更多信息.如果您的应用程序不使用Apple Push Notification 服务,无需采取任何措施.您将来可能会删除该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天全站免登陆