Xcode 8 "the aps-environment entitlement is missing from the app's signature" 提交
Xcode 8 "the aps-environment entitlement is missing from the app's signature" on submit
我有一个应用程序,我们在过去 6 个月内提交了数十个版本,我们确实使用 APNS。升级到 Xcode 8
后,我从 Apple 收到了以下电子邮件
Dear developer,
We have discovered one or more issues with your recent delivery for
APP_NAME. Your delivery was
successful, but you may wish to correct the following issues in your
next delivery:
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.
After you’ve corrected the issues, you can use Xcode or Application
Loader to upload a new binary to iTunes Connect.
Regards,
The App Store team
奇怪的是我去了 developer.apple.com -> Certificates, Identifiers & Profiles 并且我的 AppId 确实有 Push通知仍然启用。我没有做任何不同的事情,所以我很好奇 Xcode 8 更新是否破坏了某些东西。有任何想法吗?
顺便说一句:他们为推送通知编程指南提供的 link 在电子邮件中被破坏了,所以这不是一个好兆头。
其实很简单。由于某种原因,它在 Xcode 8 上被禁用,但转到目标 -> 功能并验证推送通知在该视图上是否全部正确。对我来说,它有一个 "Fix Me" 我必须点击,瞧。
Xcode8 中发生了变化,您的权利不再来自应用程序标识符,而是来自您在应用程序目标中选择的功能。因此,就像 Unome(OP)所说,您必须验证推送通知是否已打开。
对我来说,这不是“修复我”按钮,而是我有两个授权文件(一个用于开发,一个用于分发)。切换推送通知功能会将 aps-environment
键(值为 development
)添加到开发授权文件中,但不会将其添加到分发授权文件中。将相同的密钥复制到分发版可以消除上传到 iTunes Connect 时的警告电子邮件。
对于大多数项目,打开推送通知应该就足够了,或者如果它已经打开但密钥不在权利中,请尝试将其关闭并重新打开。
还值得注意的是,权利会在存档期间自动更新。即,为 release 构建生成的权利可能不同于为 development 构建生成的权利。参见 here
During the app distribution process through the Xcode Organizer >
Archives tab, entitlements are set onto the app by way of the
provisioning profile used for code signing. It is important to be
aware that the re-application of entitlements at this phase creates
the opportunity for unintended entitlement differences between any
prior development builds you may have tested. The primary purpose of
this document is to verify that your entitlements are correct for your
distribution builds for beta testing and App Store submission.
我也有同样的问题,我确定 Xcode8 中的推送通知默认是关闭的。我没注意到。小心点。
经过一天与 Xcode 8 的斗争之后,我们无法弄清楚为什么 aps-environment
开发没有添加到我们的调试版本中。它在用于调试测试的内置应用程序的权利部分中缺失......即使我们启用了新功能并且权利文件存在。问题是需要在 Xcode 调试授权的构建设置中为任何 SDK 设置授权文件。
来自Xcode release notes:
Xcode 8 does not automatically copy the aps-environment entitlement from provisioning profiles at build time. This behavior is intentional. To use this entitlement, either enable Push Notifications in the project editor’s Capabilities pane, or manually add the entitlement to your entitlements file. (28076333)
这是一个很大的变化,因为 aps-environment 权利不需要 plist 总是很奇怪,但许多其他人需要。
对于那些不想盲目按下 "Fix Me" 并且当前没有授权文件的人,它只是一个 plist 文件,在 [=19= 下项目的构建设置中被引用]
我使用 XCode 7.3.1 从 Apple 收到了同样的电子邮件。我为解决问题所做的是:
- 根据@Bruce Tsai 的回答,在“功能”>“开启推送通知”下。
- 在 Build-Settings > Code Signing > Code Signing Identity 下设置用于调试的开发人员证书和用于发布的分发证书,如图所示:
自动管理签名对我来说是关闭的,我检查过并且工作正常。
使用 Xcode 9 推送通知已启用。
我尝试了 disabling/re-enabling 推送通知 功能。 (没用)
我试过disabling/re-enabling自动管理签名。 (没用)
原来我不得不删除并重新添加我的配置文件。 ()
您可能需要 disable/re-enable 在病房后自动管理签名。
如果您使用的是 Firebase 框架而不使用推送通知,则有两种解决方案 1. 忍受每次上传二进制文件时发送给整个团队的 'issue' 消息。只要您实际上没有使用通知,该应用仍将被接受为提交,您可以忽略该警告。或 2. 这样做: 。这将删除烦人的电子邮件通知,并被接受为提交。
对我来说,问题是因为有两个授权文件:Entitlements-Debug.plist
和 Entitlements-Release.plist
。而且其中只有一个(Debug)需要在里面设置。
正在将 Build Settings > Signing > Code Signing Entitlements 的多个值更改为单个 MyAppName/MyAppName.entitlements
,然后重新启用 Capabilities > Push Notifications switcher 帮了我大忙。
希望对您有所帮助。
还有一个可行的选项:将 AppName/Entitlements-Debug.plist
的源代码复制粘贴到 AppName/Entitlements-Release.plist
。
我有一个应用程序,我们在过去 6 个月内提交了数十个版本,我们确实使用 APNS。升级到 Xcode 8
后,我从 Apple 收到了以下电子邮件Dear developer,
We have discovered one or more issues with your recent delivery for APP_NAME. Your delivery was successful, but you may wish to correct the following issues in your next delivery:
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.
After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to iTunes Connect.
Regards,
The App Store team
奇怪的是我去了 developer.apple.com -> Certificates, Identifiers & Profiles 并且我的 AppId 确实有 Push通知仍然启用。我没有做任何不同的事情,所以我很好奇 Xcode 8 更新是否破坏了某些东西。有任何想法吗?
顺便说一句:他们为推送通知编程指南提供的 link 在电子邮件中被破坏了,所以这不是一个好兆头。
其实很简单。由于某种原因,它在 Xcode 8 上被禁用,但转到目标 -> 功能并验证推送通知在该视图上是否全部正确。对我来说,它有一个 "Fix Me" 我必须点击,瞧。
Xcode8 中发生了变化,您的权利不再来自应用程序标识符,而是来自您在应用程序目标中选择的功能。因此,就像 Unome(OP)所说,您必须验证推送通知是否已打开。
对我来说,这不是“修复我”按钮,而是我有两个授权文件(一个用于开发,一个用于分发)。切换推送通知功能会将 aps-environment
键(值为 development
)添加到开发授权文件中,但不会将其添加到分发授权文件中。将相同的密钥复制到分发版可以消除上传到 iTunes Connect 时的警告电子邮件。
对于大多数项目,打开推送通知应该就足够了,或者如果它已经打开但密钥不在权利中,请尝试将其关闭并重新打开。
还值得注意的是,权利会在存档期间自动更新。即,为 release 构建生成的权利可能不同于为 development 构建生成的权利。参见 here
During the app distribution process through the Xcode Organizer > Archives tab, entitlements are set onto the app by way of the provisioning profile used for code signing. It is important to be aware that the re-application of entitlements at this phase creates the opportunity for unintended entitlement differences between any prior development builds you may have tested. The primary purpose of this document is to verify that your entitlements are correct for your distribution builds for beta testing and App Store submission.
我也有同样的问题,我确定 Xcode8 中的推送通知默认是关闭的。我没注意到。小心点。
经过一天与 Xcode 8 的斗争之后,我们无法弄清楚为什么 aps-environment
开发没有添加到我们的调试版本中。它在用于调试测试的内置应用程序的权利部分中缺失......即使我们启用了新功能并且权利文件存在。问题是需要在 Xcode 调试授权的构建设置中为任何 SDK 设置授权文件。
来自Xcode release notes:
Xcode 8 does not automatically copy the aps-environment entitlement from provisioning profiles at build time. This behavior is intentional. To use this entitlement, either enable Push Notifications in the project editor’s Capabilities pane, or manually add the entitlement to your entitlements file. (28076333)
这是一个很大的变化,因为 aps-environment 权利不需要 plist 总是很奇怪,但许多其他人需要。
对于那些不想盲目按下 "Fix Me" 并且当前没有授权文件的人,它只是一个 plist 文件,在 [=19= 下项目的构建设置中被引用]
我使用 XCode 7.3.1 从 Apple 收到了同样的电子邮件。我为解决问题所做的是:
- 根据@Bruce Tsai 的回答,在“功能”>“开启推送通知”下。
- 在 Build-Settings > Code Signing > Code Signing Identity 下设置用于调试的开发人员证书和用于发布的分发证书,如图所示:
自动管理签名对我来说是关闭的,我检查过并且工作正常。
使用 Xcode 9 推送通知已启用。
我尝试了 disabling/re-enabling 推送通知 功能。 (没用)
我试过disabling/re-enabling自动管理签名。 (没用)
原来我不得不删除并重新添加我的配置文件。 (
如果您使用的是 Firebase 框架而不使用推送通知,则有两种解决方案 1. 忍受每次上传二进制文件时发送给整个团队的 'issue' 消息。只要您实际上没有使用通知,该应用仍将被接受为提交,您可以忽略该警告。或 2. 这样做:
对我来说,问题是因为有两个授权文件:Entitlements-Debug.plist
和 Entitlements-Release.plist
。而且其中只有一个(Debug)需要在里面设置。
正在将 Build Settings > Signing > Code Signing Entitlements 的多个值更改为单个 MyAppName/MyAppName.entitlements
,然后重新启用 Capabilities > Push Notifications switcher 帮了我大忙。
希望对您有所帮助。
还有一个可行的选项:将 AppName/Entitlements-Debug.plist
的源代码复制粘贴到 AppName/Entitlements-Release.plist
。