IOS Error:'Cannot create an NSPersistentStoreCoordinator with a nil model'
I backed to build my first iOS app again. Today, I got this error:'Cannot create an NSPersistentStoreCoordinator with a nil model'.
Actually, that is easy to fix.
Please make this line of code:
Code
NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"[name]" withExtension:@"momd"]; |
The [name] you filled in is same as your model file (.xcdatamodeld).
For example I got a TipRecord.xcdatamodeld then this line should be:
Code
NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"TipRecord" withExtension:@"momd"]; |
Trackback address for this post
Trackback URL (right click and copy shortcut/link location)
Feedback awaiting moderation
This post has 4080 feedbacks awaiting moderation...
Form is loading...