Cannot create an NSPersistentStoreCoordinator with a nil model

前端 未结 27 1097
囚心锁ツ
囚心锁ツ 2021-01-30 03:33

Been having my first crack at Core Data and I\'m getting the following error when running my code on my device, but it works fine on the simulator..

*

27条回答
  •  佛祖请我去吃肉
    2021-01-30 04:13

    I tried all the solutions here, and none of them worked. My issue appeared after I renamed the project. Apparently, Xcode continues to look for the old momd file in the wrong place during compilation.

    For anyone that tried all the above solutions without success, try checking the full path of your .xcdatamodeld file. That's what worked for me.

提交回复
热议问题