Apple TestFlight 上传警告 ITMS-90191:缺少 `beta-reports-active` 权利

Apple TestFlight upload warning ITMS-90191: missing `beta-reports-active` entitlement

当我将构建上传到新的 Apple 拥有和 iTunes Connect 集成的 TestFlight 时,我看到以下日志:

WARNING ITMS-90191: "Missing beta entitlement. Your app does not include the beta-reports-active entitlement. If you intend to distribute this build via TestFlight for beta testing, please re-build this app with a newly generated provisioning profile."

当我查看 iTunes Connect 上的构建时,我还看到以下警告:

To use TestFlight Beta Testing, build X.Y.Z must contain the correct beta entitlement. For more information, see the FAQ.

链接的常见问题解答指出:

What should I do if my prerelease build does not contain the correct beta entitlement?

To use the TestFlight app to test your prerelease build, it must be signed with an App Store Distribution Provisioning profile that includes the beta entitlement. New Distribution Provisioning profiles generated in the iOS Developer Center will automatically contain the beta entitlement.

If you have an existing Distribution Provisioning Profile that was generated before the launch of TestFlight Beta Testing, you must regenerate the profile.

问题是我正在使用新创建的 App Store Distribution Provisioning Profile。我是这样创建的:

当我检查下载的配置文件的来源时,我看到:

<key>Entitlements</key>
<dict>
    // ...
    <key>aps-environment</key>
    <string>production</string>
    <key>beta-reports-active</key>
    <true/>
    // ...

所以配置文件是为 production 设置的, 是否包含 beta-reports-active 权利。

但是,当此版本上传到 TestFlight 时,iTunes Connect 继续抱怨。

关于如何解决这个问题有什么想法吗?这是 Apple 的错误吗?

rdar://20128048

首先,确保您使用的是App Store Distribution Provisioning Profile。这可能是与您用于签署 Apple TestFlight 之前版本的 Ad Hoc Distribution Provisioning Profile 不同 provisioning profile。

在切换到 App Store 分发配置文件后,我继续遇到错误 ITMS-90191 。我通过在 Xcode 项目中将 beta-reports-active 键添加到我的 Target 的 Entitlements.plist 文件中解决了这个问题。

beta-reports-active 密钥必须包含在供应配置文件中 AND 目标的权利。

TargetName.entitlements:

<?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>beta-reports-active</key>
    <true/>

    // ...

</dict>
</plist>

将权利添加到我的 Target 后,我​​能够成功地将构建上传到 iTunes Connect TestFlight 而没有 ITMS-90191 警告:

我无法手动编辑 plist 文件。
编辑现有配置文件并生成文件这次也不起作用。
但是,就像 joehl 一样,创建一个全新的配置文件实际上为我修复了它。因此,创建一个全新的 Provision Profile,您将恢复业务。这看起来像是 TestFlight 中的一个小故障。

我可以通过将它添加到我的 xcodebuild 脚本来解决这个问题。

xcodebuild ... PROVISIONING_PROFILE=<Provisioning Profile Id>

看起来在 Build Settings 中手动设置 Code Sign Identities 也可以解决这个问题。

使用 AppStore 配置文件为我解决了这个问题。我设法成功地在设备上分发和安装。我像往常一样使用 AdHoc 配置文件,突然开始出现此错误。确实令人沮丧。

一个简单的解决方案:删除您以前的配置文件,然后创建一个新的。解决了我的问题。 :)

如果您使用的是 Fastlane,请确保在 sigh 步骤中将 ad-hoc 设置为 false,否则它会生成一个不适合 TestFlight 分发的 ad-hoc 配置文件。即:

sigh(
  adhoc: false,
  team_id: "XXXXXXXXX"
)

我使用以下命令编辑了我的 entitlements.plist /usr/libexec/PlistBuddy -c "Add :beta-reports-active bool true" entitlements.plist

我刚刚成功向 TestFlight 提交了一个新的应用程序版本,并在 Apple 接受我的提交后意识到我的 Entitlements.plist.

中没有 beta-reports-active

在我之前为 TestFlight 提交的版本中,我的提交会因“缺少测试版权利”而被拒绝

有没有其他人注意到 TestFlight 不再需要 beta-reports-active?