通过 CloudKit 打开共享文档时出错

Error opening shared document via CloudKit

CloudKit分享是今年引入的,我正在努力实施。

我正在使用 UICloudSharingController 并将共享及其根记录保存在成功的完成处理程序中。但是,当我共享 link(例如通过 iMessage)并在另一台设备(不同的 iCloud 帐户,相同的版本)上打开它时,它显示以下错误:

Couldn't open "Share"

You need a newer version of APPNAMEto open this, but the required version couldn't be found in the App Store. If you're not sure which version to use, check with the owner.

因为这是一个新的应用程序,它当然不在应用程序商店中。我需要先测试共享(先有鸡还是先有蛋?),所以有人知道如何测试 CloudKit 共享吗?

原来,我错过了

<key>CKSharingSupported</key> <true/>

进入我的 Info.plist。这解决了错误。