Swift Data - fail gracefully if file can't be opened

Hello

By default if swiftData is unable to open a file on mac (due to it being the wrong format, or an old model) the app hard crashes (macOS 14.4.1) - is there a way to catch this problem and present a message to the user, rather than the app simply crashing

The whole way that swiftData opens files etc is very opaque so I'm not clear how we can wrap things in a nice way

Thanks

Richard

Swift Data - fail gracefully if file can't be opened
 
 
Q