I'm testing swift with CoreData and I created the following code: import UIKit import CoreData class Contact: NSManagedObject { @NSManaged var name: String @NSManaged var email: String class func execute(){ let appDel:AppDelegate = (UIApplication.sharedApplication().delegate as AppDelegate) let context:NSManagedObjectContext = appDel.managedObjectContext! let entityDescripition = NSEntityDescripti