您的应用程序包签名中的权利与配置文件中包含的权利不匹配

我已经向 TestFlight 提交了许多应用程序版本,即使是昨天,但今天当我尝试通过 XCODE 将我的应用程序提交给 TestFlight 时,我收到以下错误:

ERROR ITMS-90164: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. According to the provisioning profile, the bundle contains a key value that is not allowed: '[ ]' for the key 'com.apple.developer.healthkit.access' in 'Payload/Runner.app/Runner'."

我正在通过 XCODE 构建一个颤振项目。我尝试了以下方法:

  • 清理我的项目。
  • 在 XCODE 中重新启用自动应用签名。
  • 从 ~/Library/MobileDevice/Provisioning Profiles/ 中删除我的配置文件
  • 通过 Apple Developer 站点禁用自动登录 xcode 并创建我自己的配置文件

但我仍然收到此错误。我的启用与上次上传我的应用程序相比没有改变。请帮忙,谢谢。

更新 1:似乎是在 Apple 端所做的更改导致此错误。Apple 尚未提供官方回应/解释。下面提供了一些解决方法。我为 Health Kit 启用启用了临床健康记录使用,因为此解决方法不使用任何非 Apple 批准的更改。所以在技术上仍然不是最终的解决方案,而是一种解决方法。

更新 2:Apple 已经解决了这个问题,不再需要解决方法。

回答

I was facing the similar error.

I believe the Apple back-end has changed and has started applying a stricter rule to entitlement keys that take array values.

I believe the Apple back-end used to accept empty arrays for entitlement keys that took array values but now require the entitlement key to either not be present at all or to contain actual values.

Evidence to back this assertion:

  • I have an entitlements file with a key for "com.apple.developer.icloud-container-identifiers" entitlement with an empty array like so:
  <key>com.apple.developer.icloud-container-identifiers</key>
  <array/>
  <key>com.apple.developer.icloud-container-identifiers</key>
  <array/>
  • This was fine until just yesterday (I successfully submitted a build, and have submitted builds like this for more than a year).

The Fix:

Remove or Comment out the following line from the .entitlements file:

  • The key was empty anyway so should not have an effect after being removed.

Now the TestFlight submission is successful.


回答

解决方案

对我有用的是删除.entitlements文件中的以下行

<key>com.apple.developer.healthkit.access</key>
<array/>
<key>com.apple.developer.healthkit.access</key>
<array/>

验证

  • 我仔细检查过,当通过 Xcode 构建时,HealthKit访问仍然适用于读/写
  • 我通过TestFlight测试了该应用程序,一切看起来都还不错
  • 我的应用程序获得批准,对于现有用户和新用户来说一切正常:)

旁注

  • 我遇到过同样的问题。我已经几个月没有更改权限了,突然出现了这个错误。可能是 Apple 更改了一些逻辑并对其后端授权验证应用了更严格的规则。

  • 有趣的是,如果您创建一个新的 Xcode 项目并添加 HealthKit 权利,它会创建如下权利:

<key>com.apple.developer.healthkit</key>
<true/>
<key>com.apple.developer.healthkit.access</key>
<array/>
  • 有趣的阅​​读:https : //developer.apple.com/forums/thread/10738
  • devleoper.apple Link is broken

回答

删除 'com.apple.developer.healthkit.access' 对问题没有帮助。到目前为止,我们只能希望等待苹果解决这个问题。

论坛上的主题(我无法访问 Marceeelll 的主题):https :
//developer.apple.com/forums/thread/671352

有关的:

  • App Store Connect 操作错误:关键 com.apple.developer.healthkit.access 的 ITMS-90164 []
  • This isn't a solution, yes it allows you to build and upload but renders the bundle invalid.

回答

对我来说,解决方案是删除 .entitlements 文件中的以下行

!如果您为 TestFlight 提交应用程序,这项工作!

如果您提交应用程序以供审核,这将不起作用 :(。二进制文件将被拒绝 ITMS-90000:此捆绑包无效 - $message。

什么对我有用:首先,当您启用应用程序的 HealthKit 功能时:您还必须选中临床健康记录复选框!

接下来,您必须在应用的 Info.plist 文件中提供 Health Records Usage 字符串。


回答

“icloud-container”对我来说也是同样的错误,只需在你的 . 权利文件:

<key>com.apple.developer.[YOUR-ERROR]</key>
<array/>


回答

从权利文件中删除空的 iCloud 容器权利(数组)为我解决了这个问题。似乎是 Apple 的服务器端更改,不再允许在那里使用空数组。


以上是您的应用程序包签名中的权利与配置文件中包含的权利不匹配的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>