CoreData AppDelegate - ERROR

0

I'm encountering an error creating the context variable "There was an error creating or loading the application's saved data." The error returned is in the persistentStoreCoordinator of AppDelegate.swift

@IBAction func salvarButton(sender: UIButton) {
    let appDel: AppDelegate = UIApplication.sharedApplication().delegate as! AppDelegate 
    let context: NSManagedObjectContext = appDel.managedObjectContext


let newUser = NSEntityDescription.insertNewObjectForEntityForName("Pessoa", inManagedObjectContext: context)
newUser.setValue(nomeText.text, forKey: "nome")
newUser.setValue(Int(idadeText.text!), forKey: "idade")
    
asked by anonymous 26.10.2015 / 12:44

1 answer

0

The problem appeared after I modified the database .. The problem was solved by restarting the Simulator, in the Simulator menu - > Reset Content and Settings

    
26.10.2015 / 12:58