My code looks like that:
NSManagedObjectContext *context = [self.fetchedResultsController managedObjectContext];
NSEntityDescription *entity = [[self.fet
Change the code in fetchedResultsController
:
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Obrat" inManagedObjectContext:self.managedObjectContext];
to
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Obrta" inManagedObjectContext:self.managedObjectContext];
Entity named
you create with Xcode must keep same with the NSEntityDescription
in your code
You say you have an entity named "Obrta"
, but the code is creating an object of type "Obrat"
. Fixing that typo should fix your issue.