I had to change this section for Xcode 7.1.1 and Swift 2.1
[code]let fetchRequest = NSFetchRequest(entityName: “Car”)
let fetchResult: [AnyObject]? = try! managedObjectContext?.executeFetchRequest(fetchRequest)
if let cars = fetchResult as? [NSManagedObject]
{
for car in cars
{
if let makeModel = car.valueForKey(“makeModel”) as? String
{
print(“Fetched car: (makeModel)”)
}
}
}
[/code]