I use NSManagedObjectContext performBlock{}
But,
My app always crash here
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Can only use -performBlock: on an NSManagedObjectContext that was created with a queue.'
How to know the right thread about the NSManagedObjectContext
.
The create NSManagedObjectContext
code is here
Person *aPerson = (Person *)[NSEntityDescription insertNewObjectForEntityForName:@"Person" inManagedObjectContext:[CoreDataManager sharedInstance].managedObjectContext];
Please give some comments