I'm seeing the same crash after updating iPhone to iOS18. It doesn't crash the sim, which is iOS17 for me. Also a very weird thing is that if I don't call saveContext() is don't crash (but the context does seem to update and look like the record is deleted??). Thankfully I haven't released app to prod yet. This is quite worrying. I've spent a lot time trying different way of passing in a context. This doesn't happen on iOS 17.
this seem to work in my delete function, but shouldn't I have to save the context?
container.mainContext.delete(recording)
// saveContext()
SwiftData/BackingData.swift:251: Fatal error: Context is missing for Optional(SwiftData.PersistentIdentifier(id: SwiftData.PersistentIdentifier.ID(url: x-coredata://2B4AE978-7D52-4789-A52A-4593CEBF5690/Recording/p27), implementation: SwiftData.PersistentIdentifierImplementation))
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags: