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

I'm curious what experience others have had using .externalStorage to store videos, particularly quite large videos between 250mb to 500mb.

Is there a substantial difference between using .externalStorage vs. using CKAsset directly. Are there other approaches when considering large AVAssets?

storing AVAsset in SwiftData
 
 
Q