Is it possible to create records in a shared database of another user in CloudKit?

When I attempt to create new records in a shared database of another user I get a CREATE operation not permitted error. Even though this record type has "CREATE" permissions for Authenticated Users in cloudkit. I also see this in the cloudkit dashboard when I attempt to manually create a new record manually in the cloudkit dashboard (The gui comes up with an alert "There was a problem saving this record", create operation not permitted.

I feel like the permissions should be there becuase the record type has create permissions for authenticated users. But is there something else at play here because it is a shared database?

Replies

I have the same problem.
It seems that you can't use dashboard to create a record in a share database. For me it says CREATE operation not permitted.

I think it works like this. The otherUser's shared database is only accessible to the otherUser. After the otherUser accepts your share, the otherUser interacts with the share and its rootRecord (the record you shared) in the otherUser's sharedDatabase. You, on the other hand, interact with the rootRecord in your privateDatabase, which the otherUser has no access to.

This question has been asked and answered here

Apart from the answer in Stackoverflow I think there is a misconception here. Via the Cloudkit API the user can change (not delete) the record that has been shared via the Shared database. There is a cloudkit.share record type that I don't know what it does but I guess it has something to do with it. Anyways. You can add or delete more child records (for example if the root records is a topic record type you can add a note to it) but it is extremely important to set the parent of the child record to the root record (recordID) or then you will get a CREATE not permitted error.