One problem with calling + (void) setupCoreDataStack; from the applicationDidFinishLaunching:(UIApplication *) withOptions:(NSDictionary *) as the documentation suggested is that bindings in views to managedObjectContext get called before applicationDidFinishLaunching. Perhaps ManagedObjectContext could also be lazily created and automatically setup just like ManagedObjectModel and PersistentStoreCoordinator?
+ (void) setupCoreDataStack;
applicationDidFinishLaunching:(UIApplication *) withOptions:(NSDictionary *)
static BOOL shouldAutoCreateManagedObjectModel_;
static BOOL shouldAutoCreateDefaultPersistentStoreCoordinator_;
I can write the lazy creation code but I am wondering if there is any design decision involved to not auto create the managedObjectContext.
What do you think of this?
+ (NSManagedObjectContext *)MR_defaultContext
I think I'd still be more apt to putting the setup stuff in the awakeFromNib method, or in your AppDelegate's init method, or even from the main method, prior to launching your app delegate. The setup methods are meant to do things more precisely like setting up a core data stack with some alternative options. I setting up the default context setter method is not the proper place in my opinion as there are more viable options here.