Hi Ziqiao,
Thanks for your detailed reply – and you’re absolutely right.
You’re correct that the .shared option in ModelConfiguration(cloudKitDatabase:) isn’t supported and doesn’t compile. I had initially hoped it might be possible based on how .automatic behaved for syncing within the same Apple ID, but now I understand the limitation more clearly.
So to clarify:
• The sharing that “worked” was actually just syncing across devices with the same Apple ID using the private CloudKit DB.
• When testing across multiple Apple IDs, it failed with the well-known “Bad Container” and CKShare-related errors.
• After discussing with DTS, I’ve started converting the app to Core Data + CloudKit + Sharing, using UICloudSharingController and manual CKShare handling.
The full transition is still in progress, but I’m hopeful that this approach will finally allow working sharing between different iCloud accounts.
Thanks again for your support — it really helps to get direct feedback on what’s supported and what’s not.
Best regards,
Sebastian
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags: