storing AVAsset in SwiftData

Hi,

I am creating an app that can include videos or images in it's data. While

@Attribute(.externalStorage)

helps with images, with AVAssets I actually would like access to the URL behind that data. (as it would be stupid to load and then save the data again just to have a URL)

One key component is to keep all of this clean enough so that I can use (private) CloudKit syncing with the resulting model.

All the best Christoph

storing AVAsset in SwiftData
 
 
Q