Architecture diagram: a macOS app writes data to CloudKit, an iOS app then reads this data from CloudKit

(1) Made new CKContainer in the console.
(2) Created macOS app with an iCloud entitlement to the new container.
(3) Inflated the container’s public database with a schema and sample records.
(4) Created separate iOS app with entitlement to same CloudKit container.
(5) Fetched CKRecord objects from CloudKit and displayed results in SwiftUI.

I’ve explored CloudKit as a compliment to Core Data before. But never as a standalone store like this. My main requirement was not using the console for schema and data tasks. I had reluctantly considered cktool cli or cktool.js with some node scripts, but neither of these felt great. A companion Mac app turned out to be a much nicer solution.

Seeing the data appear on the iOS app for the first time was a good moment. I didn’t expect to get this far today!

T-minus 58 days…