【问题标题】:Getting an icloud entitlement error when uploading iOS build to app center将 iOS 版本上传到应用中心时出现 icloud 授权错误
【发布时间】:2026-02-05 12:10:01
【问题描述】:

我收到以下 iCloud 错误。

错误域=IDEFoundationErrorDomain Code=1 "exportOptionsPlist 错误 对于键“iCloudContainerEnvironment”:期望 {Development, 生产},但未提供任何值” UserInfo={NSLocalizedDescription=exportOptionsPlist 键错误 'iCloudContainerEnvironment':期望 {Development, Production},但未提供任何值}

我拥有以下 iCloud 权利。

<key>com.apple.developer.icloud-container-identifiers</key>
<array>
    <string>iCloud.$(CFBundleIdentifier)</string>
</array>

<key>com.apple.developer.icloud-container-development-container-identifiers</key>
<array>
    <string>iCloud.$(CFBundleIdentifier)</string>
</array>

我尝试将“开发”和“生产”作为字符串值,而不是 iCloud.$(CFBundleIdentifier)。但是,Xcode 和应用中心给了我一个错误,说 Provisioning profile doesn't match the entitlements 值。

【问题讨论】:

    标签: xcode react-native icloud entitlements visual-studio-app-center


    【解决方案1】:

    我在使用 Ionic 时遇到了同样的错误,我这样解决了

    ionic cordova build ios --prod --release -- --iCloudContainerEnvironment=Production
    

    可能在 react-native 中,您还可以在构建时传递其他标志。

    更多信息:

    【讨论】:

      最近更新 更多