0

私はコードのこの小さな部分を得ました:

nwtAppDelegate *appDelegate =(nwtAppDelegate *) [[UIApplication sharedApplication] delegate];

NSManagedObjectContext *context =
[appDelegate managedObjectContext];
NSManagedObject *newContact;
newContact = [NSEntityDescription
              insertNewObjectForEntityForName:@"EN"
              inManagedObjectContext:context];
[newContact setValue:@"laaa" forKey:@"b_1_1"];
NSError *error;
[context save:&error];

しかし、+entityForName: could not locate an entity named 'Entityname' というエラーが表示されます。

エンティティと属性は存在します。

図:

ここに画像の説明を入力

4

0 に答える 0