Post

Replies

Boosts

Views

Activity

SwiftData error 134020 - "The model configuration used to open the store is incompatible with the one that was used to create the store."
Hi all, I have tried everything (that i'm aware of) but i cannot seem to get around this error. My app is setup using only SwiftData and is basically a custom version of the apps shown in SwiftData docs. I have done the following to try to debug: Deleted app from device Clean and re-build Delete derived data and rebuild I have tried reverting changes made to the @Models i have define Every combination of the above steps + rebuilding Im at a loss. No clue how to resolve this. Some weird observations. This error only occurs after the first context.insert call. The first is successful and data is properly persisted across app launches. All subsequent attempts to insert result in the following error: Error Domain=NSCocoaErrorDomain Code=134020 "The model configuration used to open the store is incompatible with the one that was used to create the store." UserInfo={NSAffectedObjectsErrorKey=<NSManagedObject: 0x2824004b0> (entity: Track; id: 0x2807a7de0 <x-coredata:///Track/tB9B77486-8F60-4F63-848D-D1C5CC67BA526>; data: { createdAt = "2023-07-02 23:45:45 +0000"; name = Test; })}
5
3
1.9k
Jul ’23