Apple introduced the NSPersistentCloudKitContainer
with iOS 13 which enable us to use CloudKit with Core Data. I got it working pretty much instantly on different devices but my main issue is still left.
Is it possible to share the data in an easy way with other users?
I've been reading on CKShare
but don't see how I can go from NSPersistentCloudKitContainer
to that in an easy way.
On device A, tap the Add button (+) to show the photo picker, and then select a photo and add it to the Core Data store. Touch and hold the photo to display the context menu and then tap Create New Share to present the CloudKit sharing UI. Follow the UI to send a link to the Apple ID on device B.
Configuring CloudKit MirroringSynchronize objects between devices, and handle store changes in the user interface. Reading CloudKit Records for Core Data. Access CloudKit records created from Core Data managed objects.
Rules can be set up in the dashboard: CloudKit has a lot of tabs. Summary: Firebase can be immediately accessed without authentication but also provides the flexibility to define your own rules. CloudKit is probably more secure and can provide a seamless experience for your users too, but only if they are using iOS.
Cost. Although the running cost of servers is a big deal for developers. But in case of CloudKit you don't have to be worried about paying large expenses at all. As it offers a reasonable storage amount completely free.
As announced in WWDC 2021, you can now share to other iCloud users. https://developer.apple.com/videos/play/wwdc2021/10015/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With