iCloud.png

I’ve been working through setting up a macOS/iOS SwiftUI application that supports collaboration via iCloud. It is not easy!

General Approach

I started with Xcode 16’s multi-platform app template, selecting Core Data (not SwiftData) as the storage mechanism. Because Apple claims you can migrate incrementally to SwiftData, I’m hoping I’ll be able to leverage the query side of things in SwiftUI without too much hassle.

Notes

  1. If opening a shared link doesn’t open the app (e.g. you get an alert that says you need a newer version of the app), check to see that you have the SKSharingSupported property set to YES in Info.plist. That was all I needed to get to work. I don’t know if this is needed on macOS as well, as I haven’t yet tried sharing to macOS (I shared from macOS to iOS).