Cannot create an NSPersistentStoreCoordinator with a nil model

前端 未结 27 1093
囚心锁ツ
囚心锁ツ 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-30 04:22

    If your project works on the simulator but not on the device, try running the release-build on your device instead of the debug-build.

    Select your project -> Product -> Edit Scheme -> Build Configuration [DEBUG -> RELEASE]

    Now run the project again, it will work.

提交回复
热议问题