I have an iPhone application that has a MainWindow.xib holding a UITabBarController, which in turn has a UINavigationController and a custom UIViewController subclass in its
Good, I looked long and hard at the CoreDataBooks sample application and did it like this:
Added the following code to applicationDidFinishLaunching:
// pass the managed object context to the view controllers
RootViewController *rootViewController = (RootViewController *)[navigationController topViewController];
rootViewController.managedObjectContext = self.managedObjectContext;
mapViewController.managedObjectContext = self.managedObjectContext;
And now it works like a charm.