Lightweight migration working on iOS but not tvOS

EDIT ☝️:

I made a mistake testing the iOS app. It doesn't work on either. That said, I still created a new model version as usual and lightweight migration should work in this case, but it doesn't and I'm not sure why. Help would still be appreciated


Original Post:


Hi,


I've been struggling with this for a few hours but can't seem to find out what's going on here.


I have a model in my app I've been using for a while like that. I decided to add a few new attributes to one of the entities which lightweight migration should handle for me if I add a new model version.


As usual I create a new model version, set it as the current version and update my entity. It works fine for the iPhone version of the app.


I'm using the same model in the tvOS version of the app. In that one, the migration is failing with the classic The model used to open the store is incompatible with the one used to create the store error, which is usually thrown when changing a model without adding a new version - which I did not do.

I'm not sure what's going on. It works on iPhone, but fails on Apple TV. There's no magic code or anything involved.

It's throwing in AppDelegate's persistentStoreCoordinator property when calling

addPersistentStore(ofType storeType: String, configurationName configuration: String?, at storeURL: URL?, options: [AnyHashable : Any]? = nil)