I created an iOS project and a managed object model ( Model.xcdatamodeld ) with one object. In application:didFinishLaunchingWithOptions: I want to check if a managed object model exists, but I get nil . Should I do something special to create a managed entity context after creating a managed entity model?
Any suggestions on what I might be doing wrong?
This is the interface
@interface AppDelegate : UIResponder <UIApplicationDelegate> { } @property (nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContext; @property (nonatomic, strong, readonly) NSManagedObjectModel *managedObjectModel; @property (nonatomic, strong, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator; @end
This is an implementation file
source share