Frage

I'm not sure what happened, started getting a model version error and after reading here on some options, I ended up deleting and creating the model again (lot of agony). Now however, I am getting the "Cannot create an NSPersistentStoreCoordinator with a nil model" error.

I hope read most post on here (tried many approaches and didn't work). As I discovered where the file is (iPhoneSimulator), I inspected the contents of the app and did not find any mom or momd files in there. So I copied to bundle, made sure it was in compile resources, reset simulator, cleaned and loaded again, and didn't find it (along with the gracious app crash).

Any thoughts?

Thanks

War es hilfreich?

Lösung

Not sure what happened, I must have corrupted the database somehow. I just created a new project (same name, different directory), created the core data model again (you can just copy and paste entities from old version to new one, but make sure you reconnect the relationships). THEN generate the nsmanagedobject classes.

Then I copied all the other files, classes, etc... It worked fine after that.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top