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 = [[Challenges alloc] init];
[newChallenge setName:@"TestChallenge"];
[newChallenge setRounds:[[NSNumber alloc] initWithInt:12]];
[newChallenge setShots:[[NSNumber alloc] initWithInt:5]];
[newChallenge setDate:[NSDate date]];
But however after the alloc init I get this error:
CoreData: error: Failed to call designated initializer on NSManagedObject class 'Challenges'
What the hack is going wrong?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…