當我嘗試將屬性添加到我的實體時,我的應用程序會收到SIGABRT。當試圖在實體中添加屬性時SIGABRT。 iOs上的核心數據
NSManagedObjectContext *context=[[HistoryDataManager sharedInstance] mainObjectContext];
NSEntityDescription * entityDescription = [NSEntityDescription entityForName:@"Request" inManagedObjectContext:context];
Request *request=[[[Request alloc] initWithEntity:entityDescription insertIntoManagedObjectContext:context] autorelease];
NSLog(@"request: %@", request);
request.requestText=string;
request.timeStamp=[NSDate date];
[context insertObject:request];
NSError * error;
if (![context save:&error]) {
NSLog(@"Saving error : %@", [error userInfo]);
}
我有與名稱請求和上下文=無實體,但我有SIGABRT消息每次在這個地方!
NSEntityDescription * entityDescription = [NSEntityDescription entityForName:@"Request" inManagedObjectContext:context];
我們可以有完整的SIGABRT消息嗎? – KIDdAe
不知何故,在控制檯中沒有SIGABRT消息 – stalk