icloudcloudkitckshare

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


I am programatically creating a CKShare and sharing the URL with recipients over email; when they do this, they click on the link and the UIApplication 'userDidAcceptCloudKitShareWithMetadata' method is correctly called. I then use the CKAcceptSharesOperation to mark the share as 'accepted'.

In most cases, it's working fine, even with the app in production environment. Every now and then, a user messages that they get an error with the CKAcceptSharesOperation .. the error says something like "Couldn't get a Sharing identity set". The error in full:

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}

I had the user check his/her iCloud account, and it seems fine. The iCloud account is new, so that might have something to do with it? If not, what else could be causing this? What can I try to isolate the issue?

Thanks.


Solution

  • It turns out the error was because the user hadn't accepted terms and conditions. The user should log into iCloud.com ... the website might prompt for setting up security questions and/or accepting Terms & Conditions. The user also might have to log out of the iCloud account on device and log back in. That should fix the issue.