NSManagedObjectContext returning nil iphone

Posted by harekam_taj on Stack Overflow See other posts from Stack Overflow or by harekam_taj
Published on 2010-03-22T00:37:05Z Indexed on 2010/03/22 0:41 UTC
Read the original article Hit count: 520

Filed under:
|

Hey,

I created a class ServerModel for my app and in it I want to make a connection to the Sqlite database I have on the device, but anytime I go to check my NSManagedObjectContext it is returning null.

While the same work well in my other class RootViewController

In my appdelegate I am doing

 rootViewController.managedObjectContext = self.managedObjectContext;

 serverModel.managedObjectContext = self.managedObjectContext;

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk