Add NSManagedObject to existing CKShare

Using NSPersistentCloudKitContainer, how do I add (or modify) the NSManageObjects that are part of a Share/Zone?

I have initially created a CKShare using NSPersistentCloudKitContainer.share(_:to:completion:), how can I add objects to that share later on? Calling the method again (with to:existingShare filed), always seems to create a new Share.

In fact, I don't understand what the to: parameter is for? It doesn't matter if I set it or not, a new CKShare is always created.

Just to note, this also doesn't work in the sample app Synchronizing a Local Store to the Cloud.

I can share a post and make changes to that post that the other user will see. But I can't share attachments to that post, because those NSManagedObjects aren't being shared.

Just to note: This also doesn't work in the sample app Synchronizing a Local Store to the Cloud.

In the sample app, I can share a post and make changes to that post that will be synced. But if I add attatchements, those aren't synced. Presumably because those NSManagedObjects aren't part of the CKShare.

Have the same issue. I can only update the existing shared objects, but if I add children objects to the shared root object, these aren't shared across users.

Add NSManagedObject to existing CKShare
 
 
Q