Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove self from shared record

Tags:

cloudkit

What is the correct way for a user B to remove himself from a shared record owned by user A? I think I remember from some of the WWDC videos that user B would just delete the CKShare from his shared db, but it seems that the user will still remain a participant when looking at the permissions with user A's device. And, user B can "rejoin" by using the original link used to receive the record the first time.

like image 711
Jonny Avatar asked Oct 17 '22 23:10

Jonny


1 Answers

Probably long forgotten, but I found this while looking for the same information (very few detailed articles about CKShares...).

Deleting the share seems to be the only way if you are not the share owner. User B remains, but his status changes to not determined. Trying to remove the currentUserParticipant from the CKShare results in the following exception:

Terminating app due to uncaught exception 'CKException', reason: 'You cannot remove yourself as a participant on the share. Delete the share instead if you want out.'

Only the owner can add/remove participants to the share.

like image 187
Морт Avatar answered Dec 24 '22 18:12

Морт