How to Be Notified if the Owner Removes Me from a CKShare on CloudKit
问题 Let's say the owner of a record shares it with me. I get sent a share link and I open it and accept the share like this: let operation = CKAcceptSharesOperation(shareMetadatas: [metadata]) operation.acceptSharesCompletionBlock = { error in if let error = error{ print("accept share error: \(error)") }else{ //Share accepted... } } CloudKit.container.add(operation) I am also previously subscribed to the Shared database already like so: let subscriptionSharedDatabase = CKDatabaseSubscription