NSEntityDescription
値を設定する前に、キーが存在するかどうかを確認する必要があります。JSON からのデータの辞書があり、オブジェクトに存在しないキーを設定したくありません。
Appointment *appointmentObject = [NSEntityDescription insertNewObjectForEntityForName:@"Appointments" inManagedObjectContext:[[DataManager sharedInstance] managedObjectContext]];
for (id key in dict) {
// Check if the key exists here before setting the value so we don't error out.
[appointmentObject setValue:[dict objectForKey:key] forKey:key];
}