【发布时间】:2019-07-15 18:02:02
【问题描述】:
我一直在努力让我的 iOS 应用程序启用 iCloud。
我遵循文档并在我的 Xcode 项目中使用 CloudKit 打开了 iCloud。
但是,当我从 Xcode 将应用程序上传到 App Store Connect 时,iCloud 不存在。它没有显示在“功能”下,并且在通过 TestFlight 使用应用程序时,未启用 iCloud。
我有什么特别需要做的吗?使用 Xcode 版本 10.1 + Mac OS High Sierra 10.13。
注意:下面有很多细节。如果你想跳过细节,总结是我已经按照直接的方式启用了 iCloud,但它还没有显示在 App Store Connect 中或通过 TestFlight 显示在设备上。
步骤:
我遵循了文档并尝试了一些解决方案,例如 here 和 here。
1) 我在 xcode 中打开我的项目。
2) 在 xcode Capabilities 窗格中,我打开 iCloud,检查 CloudKit,并使用默认容器(名为:“iCloud.com.[bundle identifier]”的容器)。
3) 在 developer.apple.com,我确认我使用的应用程序 ID 已自动启用 iCloud 和 CloudKit(它在那里显示为绿色)。
4) 在 developer.apple.com 上,使用该应用 ID 创建配置文件。 iCloud 列在此配置文件的“已启用服务”中。
5) 返回 xcode,在 General 窗格中,关闭自动管理签名并选择此配置文件。如果我选择“自动管理签名”,它使用“iPhone Developer”帐户作为签名证书,这似乎不正确;当我进行手动签名并选择更新的 prov 配置文件时,签名证书正确显示“Iphone Distribution: [team name]”
6) 归档应用程序:产品 -> 归档。 (我在这里仔细检查了 iCloud 在 Capabilities 窗格中保持选中状态,没有错误)
7) 上传应用:窗口 -> 组织者 -> 选择存档,点击分发应用,然后从那里获取。
结果:Build 成功上传到 App Store Connect,但看不到任何 iCloud 支持。
我还需要做什么?
注意事项:
当我归档应用程序时,权利文件(在 AppName -> AppName -> AppName.entitlements 下列出)包括以下内容:
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.icloud-container-identifiers</key>
<array>
<string>iCloud.$(CFBundleIdentifier)</string>
</array>
<key>com.apple.developer.icloud-services</key>
<array>
<string>CloudKit</string>
</array>
<key>com.apple.developer.ubiquity-kvstore-identifier</key>
<string>$(TeamIdentifierPrefix)$(CFBundleIdentifier)</string>
</dict>
</plist>
aps 环境说“开发”。我尝试过以这种方式存档和上传,但在 App Store Connect 中启用 icloud 并没有奏效。我也尝试过手动将其切换到“生产”并存档/上传——但结果也是一样的。
--底层应用程序是用 Nativescript 制作的,但我认为这对于这个阶段并不重要,因为我是通过 xcode 上传的。 (我已经浏览过关于这方面的 Nativescript 信息。)
--当我进入 cloudkit 仪表板时,容器显示“正在开发中”。我还没有看到没有错误的方法来改变它
【问题讨论】:
标签: ios xcode nativescript icloud