SwiftUI & SwiftData collaboration via ShareLink?
I’m writing a simple trip-planning app and I want to allow multiple users to collaborate on a trip. I have a SwiftData Trip
model object. From the trip’s main UI, I’m trying to use ShareLink
to start collaboration, but I can’t even figure out how to just share a Trip
object (e.g. ShareLink(item: self.trip)
). The item passed to ShareLink
must conform to Transferable
, and I can’t find any examples of how to do that to start CloudKit sharing of an object, let alone collaboration.