i'm working on app , it's first time using core data , going smooth until hit rock.
here stack trace
2015-07-20 23:39:41.030 small things[290:21425] -[entity1 length]: unrecognized selector sent instance 0x13769ecb0 2015-07-20 23:39:41.031 small things[290:21425] *** terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[entity1 length]: unrecognized selector sent instance 0x13769ecb0' *** first throw call stack: (0x184eaff94 0x199853f2c 0x184eb6cac 0x184eb3c4c 0x184db725c 0x184d97798 0x18a4cce20 0x10005f5f0 0x100063730 0x18a7fdb90 0x18a7fdce8 0x18a7ee890 0x18a802910 0x18a5abe78 0x18a4be4fc 0x189cfad04 0x189cf5920 0x189cf57e0 0x189cf4e80 0x189cf4bd4 0x189cee34c 0x184e66f44 0x184e64cbc 0x184e650ec 0x184d91800 0x18fe1f170 0x18a52a5e8 0x10005f4a0 0x19a08e8b8) libc++abi.dylib: terminating uncaught exception of type nsexception and here code caused problem:
- (void)viewdidappear:(bool)animated { [super viewdidappear:animated]; //fetch data persistence nsmanagedobjectcontext *managedobjectcontext = [self managedobjectcontext]; nsfetchrequest *fetchrequest = [[nsfetchrequest alloc] initwithentityname:@"entity1"]; nsfetchrequest *fetchrequest2 = [[nsfetchrequest alloc] initwithentityname:@"entity2"]; self.arr1 = [[managedobjectcontext executefetchrequest:fetchrequest error:nil]mutablecopy]; self.arr2 = [[managedobjectcontext executefetchrequest:fetchrequest2 error:nil]mutablecopy]; [self.tableview reloaddata]; } i don't what's wrong.
thanks in advance
usually, error entity name you're using not kind of nsstring, code believes using type else (not nsstring).
but also, model associated context’s persistent store coordinator not contain entity named entity1.
Comments
Post a Comment