I have a free and paid version of my app in the app store. I'm updating the app to share some public data using CloudKit. I'd like both the free and paid apps to share the same data.
Firstly is it possible for two apps to share the same data with CloudKit?
If so, how can I get this to work? I've tried enabling CloudKit in the capabilities of both targets and selecting the same container in both apps. The main app which has 'Use default container' selected works fine, but the other app, on which I've selected 'Specify custom containers' and selected the custom container from the first target, gets an error back when I try to download anything.
When an invited user taps or clicks the share URL, CloudKit verifies they have an active iCloud account, which must match their participant details. After successful verification, the system launches your app. CloudKit provides share metadata to your app's scene delegate or app delegate.
This is perhaps the most obvious use for CloudKit: syncing your users' data across their devices. Example: a note taking app where the user can create and read notes on any device associated with their iCloud account. Alternatives: Realm Mobile Platform, Firebase, iCloud KVS, iCloud Documents, custom web app.
CloudKit it's Apple's Backend as a Service platform and it's specially designed for iOS apps. CloudKit was introduced in the year 2014 as an amazing solution to integrate iCloud in your applications with ease. This cloud solution has been introduced by Apple.
Yes, multiple apps can use the same CloudKit data. When you get your CKContainer, I assume you are using something like the following for both apps?
let container = CKContainer.defaultContainer()
This would work for the main app (the one with the bundle identifier that matches the cloudkit identifier). The other app(s) will need to initialize the container like so:
let container = CKContainer(identifier: "iCloud.com.example.appname")
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