我正在尝试通过 Appcenter 将应用程序上传到 testflight,并且我有 icloud 文档存储功能,因此我已将以下登记添加到 enlistement.plist 中:
<?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>com.apple.developer.icloud-services</key>
<array>
<string>CloudKit</string>
<string>CloudDocuments</string>
</array>
<key>com.apple.developer.icloud-container-identifiers</key>
<array>
<string>iCloud.com.company.appname</string>
</array>
<key>com.apple.developer.ubiquity-kvstore-identifier</key>
<string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
</dict>
</plist>
我遵循了本教程: https://developer.apple.com/library/content/technotes/tn2415/_index.html
但是当我尝试将版本推送到 itunes 连接到 testflight 时,我收到此错误:
DEBUG [2018-04-24 06:34:46.43]: [Transporter]: DBG-X: parameter ErrorMessage = ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, value 'Development' for key 'com.apple.developer.icloud-container-environment' in 'Payload/App.MobileApp.iOS.app/App.MobileApp.iOS' is not supported."
我的证书分发和配置文件已按照此处的建议设置为生产:What kind of Certifcate and Provisioning Profile is needed for an iOS Apple TestFlight release? .
最佳答案
我花了很多时间试图找出如何在 App Center 上解决这个问题,并找到了一个解决方法。
使用以下名称在您的权利中定义一个 key :
com.apple.developer.icloud-container-environment
它将包含一个带有字符串值的数组:
生产
您的权利将如下所示:
<key>com.apple.developer.icloud-container-environment</key>
<array>
<string>Production</string>
</array>
确保您的构建定义处于发布或 AppStore 模式,并且您的配置文件中具有正确的权利,并且您应该没问题。
说明: 我认为通过 AppCenter 检查您的权利的过程是在获取可用于您的构建的环境时获取这两个值,而不是使用像 Xcode/VS Studio/Itunes Connect 在通过 Apple 开发者帐户验证您的配置文件环境时使用的过程。 API。
希望这对您有用。
关于ios - 由于 iCloud 组件,无法将开发应用程序分发到 Testflight,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50006896/