I am targeting iOS 10 and can't decide which method should I choose and why? Since both of the below code returns me array of objects.
CoreDataStack.shared.viewContext.perform {
do {
let allObjects = try CoreDataStack.shared.viewContext.fetch(fetchRequest)
print(allObjects)
} catch {
print("Error: \(error)")
}
}
CoreDataStack.shared.viewContext.perform {
do {
let allRules = try fetchRequest.execute()
print(allRules)
} catch {
print("Error: \(error)")
}
}