Cannot create an NSPersistentStoreCoordinator with a nil model

前端 未结 27 1051
囚心锁ツ
囚心锁ツ 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:06

    I had this problem and changing "moms" to "mom" didn't do anything. To fix it I had to right click on the xcdatamodelId file > show package contents then delete the hidden .xcurrentversion file.

    P.S: This problem only started happening after I'd changed the name of the data model file.

提交回复
热议问题