제임스의 조언을 기반으로 다음과 같이 작성했으며 다른 사람들이 코드를 문제 해결하고 대답을 사용하는 것이 유용 할 수 있다고 가정합니다. 제임스 감사합니다!
// 애플의 마스터 세부 사항 템플릿 프로젝트 에서 - (무효) insertNewObject (ID) 보낸 사람 {
//! Apple standard template code
NSManagedObjectContext *context = [self.fetchedResultsController managedObjectContext];
NSEntityDescription *entity = [[self.fetchedResultsController fetchRequest] entity];
NSManagedObject *newManagedObject = [NSEntityDescription insertNewObjectForEntityForName:[entity name] inManagedObjectContext:context];
//! Slowburner addition to view the managedObject's keys
NSEntityDescription *attDesc = [newManagedObject entity];
NSDictionary *attributesByName = [attDesc attributesByName];
NSLog(@"Names:%@",[attributesByName allKeys]);
//! shortcut to avoid whatever problem you're troubleshooting
return;