Writing my first app with CoreData. The book I'm using to guide me has code like this:
// 'Person' is my managed object class
Person *newPerson = [NSEntityDescription
insertNewObjectForEntityForName:@"Person"
inManagedObjectContext:self.managedObjectContext];
[newPerson setValue:nameField.text forKey:@"name"];
The book says that using the property style, e.g.
newPerson.name = nameField.text;
also works, but that "it is very common to see Core Data code use the KVC Approach"
To me, I can't see one reason to use the KVC approach; magic strings just beg for runtime errors and it's a lot more typing.
That being said, I'd like to learn my habits now regarding the "iPhone Way" of doing things.
Is there a difference in these approaches and, if most people use the first, KVC, approach…why?