I am trying to create a solution to update the records of CoreData, but not yet understood how this would work. To add I use the following code:
let newBird = NSEntityDescription.insertNewObjectForEntityForName("Birds", inManagedObjectContext: self.context) as! Flights
//data => NSDictionary
newBird.id = data["id"] as? String
newBird.name = data["name"] as? String
newBird.photoUrl = data["photo"] as? String\
do {
try context.save()
}catch {
print("erro on save")
}
but not yet understood how it would work to update the registry.
Can someone help me?