Cannot create an NSPersistentStoreCoordinator with a nil model

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

    On my side the problem was that I'd changed the case of a couple of characters in the database name.

    When starting a new project, Xcode automatically sets everything up from the project name. If you started out calling your project "Rugbyontv" and later decided to change to "RugbyOnTV" and did a search and replace, that would break it. (Credit to Rob for pointing out that the name is case-sensitive)

提交回复
热议问题