开发者

Core Data: Building on Device causes an NSPersistentStoreCoordinator error

开发者 https://www.devze.com 2023-03-02 20:38 出处:网络
I just build a simple app开发者_StackOverflow中文版lication using Core Data to retrieve data from a preloaded SQLite database (created by the app itself when running in the Simulator). After populatin

I just build a simple app开发者_StackOverflow中文版lication using Core Data to retrieve data from a preloaded SQLite database (created by the app itself when running in the Simulator). After populating the database I run the application on the iPhone Simulator and everything seamed to go just fine but when I run it on the device I got the following error message:

Cannot create an NSPersistentStoreCoordinator with a nil model

How can I handle this?


Can you check if your xcdatamodel(d) file is linked with your target? This can happen when there is no xcdatamodel(d) is not present inside the .app bundle.

0

精彩评论

暂无评论...
验证码 换一张
取 消