CloudKit acceptShare 错误 - "Couldn't get a Sharing identity set"

CloudKit acceptShare error - "Couldn't get a Sharing identity set"

我正在以编程方式创建 CKShare 并通过电子邮件与收件人共享 URL;当他们这样做时,他们单击 link 并且 UIApplication 'userDidAcceptCloudKitShareWithMetadata' 方法被正确调用。然后我使用 CKAcceptSharesOperation 将共享标记为 'accepted'.

在大多数情况下,即使应用程序处于生产环境中,它也能正常工作。时不时地,用户会收到消息说他们在 CKAcceptSharesOperation 中遇到错误......错误显示类似于 "Couldn't get a Sharing identity set"。完整的错误:

CKInternalErrorDomain: 5000" UserInfo={NSUnderlyingError=0x281f8f0f0 {Error Domain=CKInternalErrorDomain Code=5000 "Couldn't get a Sharing identity set" UserInfo={CKErrorDescription=Couldn't get a Sharing identity set, NSLocalizedDescription=Couldn't get a Sharing identity set, NSUnderlyingError=0x281f8d8c0 {Error Domain=CKInternalErrorDomain Code=5000 "Couldn't create a PCS identity" UserInfo={CKErrorDescription=Couldn't create a PCS identity, NSLocalizedDescription=Couldn't create a PCS identity, NSUnderlyingError=0x281f8f570 {Error Domain=NSOSStatusErrorDomain Code=-25300 "Failed finding service Sharing" UserInfo=0x2811c1400 (not displayed)}}}}}, CKErrorDescription=Couldn't get a Sharing identity set, warningTitleKey=Accept Share Failed, NSDebugDescription=CKInternalErrorDomain: 5000, NSLocalizedDescription=There was a problem with accepting this share - Couldn't get a Sharing identity set}

我让用户检查了 his/her iCloud 帐户,似乎没问题。 iCloud 帐户是新帐户,所以这可能与它有关?如果不是,还有什么可能导致这种情况?我可以尝试如何隔离问题?

谢谢。

原来这个错误是因为用户没有接受条款和条件。用户应登录 iCloud.com ...网站可能会提示设置安全问题 and/or 接受条款和条件。用户还可能必须在设备上注销 iCloud 帐户并重新登录。这应该可以解决问题。