Core Data: Building on Device causes an NSPersistentStoreCoordinator error
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.
精彩评论