how do you create a NSManagedObjectContext

In core data for the iPhone, I was getting all sorts of errors trying to save data to a NSManagedObjectContext.

I believe that my issues were all to do with me using a NSManagedObjectContext that was being used in multiple threads.

So I wanted to create a new NSManagedObjectContext and try that, but I cannot find the example code to simply create a new instance...

I know its simple, but I would really appreciate any help here.

Note, I have seen this article on the Apple docs: http://developer.apple.com/iphone/library/documentation/cocoa/conceptual/CoreDataUtilityTutorial/Articles/05_createStack.html

But this uses some code that I am not familiar with, like the XMLStore which is not supported on the iPhone, etc.

5
задан Sandy 12 February 2013 в 09:03
поделиться