swiftdata : isAutosaveEnabled, isUndoEnabled - xcode15b4 - ios17

When you set your container "manually", how can we interact with the isAutosaveEnabled and isUndoEnabled parameters from the modelContainer ?

            let schema:Schema = Schema([
                Model.self
            ])
            let configuration:ModelConfiguration = ModelConfiguration()
            let container:ModelContainer = try ModelContainer(for:schema, configuration)
            let context:ModelContext = ModelContext(container)

I think we can use modelContainer.mainContext.autosaveEnabled = ... for autosave. However it is not tested if this actually has an effect, only if it complies, as Previews currently crash for me.

same question , use container.mainContext.autosaveEnabled = false didn't work for me

swiftdata : isAutosaveEnabled, isUndoEnabled - xcode15b4 - ios17
 
 
Q