I have a little damn problem with CoreData. I want to insert a new Object, so I first have to create one. This is done by that code:
Challenges *newChallenge
In case you ask yourself "OK, so how to I get that entity?" (like I did), you do this by using the entityForName method like so:
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Challenges" inManagedObjectContext:self.managedObjectContext];
Challenges *newChallenge = [[Challenge alloc] initWithEntity:entity insertIntoManagedObjectContext:self.managedObjectContext];
Hope this helps, this thread has helped me a lot!