iOS26.1 crashing all my live SwiftData Apps 😡

Apple WTF? What did you do to all my Apps? none of them work in iOS26.1 (all worked in 26.0).

XCode simply says:

CoreData: error: addPersistentStoreWithType:configuration:URL:options:error: returned error NSCocoaErrorDomain (134140) *

  • SwiftData is supposed to do all these automatically 🤷🏻

Thanks for the post, can you tell me a little bit more about what is under your swift data? Any changes?

I'm not an expert in SwiftData at all, hopefully as you post your model other people can help you find why, however when I see that error I will consider a staged migration and I think, you should also consider a staged migration to resolve this type incompatibility:

https://developer.apple.com/documentation/coredata/staged-migrations?language=objc

Albert Pascual
  Worldwide Developer Relations.

Accepted Answer

Hello,

Thanks for the assistance. I think I found the issue. It has to do with they way we construct the ModelContainer inside the init method. The Answer is in the photos attached.

With this change, the App preserves the data and opens just fine in iOS26.1

I just need update all my Apps before sales go down 😅

This is really good news and great finding in your part!!

Thanks for letting me know.

Albert Pascual
  Worldwide Developer Relations.

Just a quick update:

This fix helps avoid the crash but it does not solve the issue cause by iOS26.1, which automatically changes SwiftData Arrays or Sets attributes from .externalStorage to .transformable. This in consequence blocks the iCloud sync mirroring and results with the full disappearance Customer's data after updating.

It is a serious bug that needs to be address by Apple ASAP.

iOS26.1 crashing all my live SwiftData Apps 😡
 
 
Q