Set the NSFetchRequest property sortDescriptors to determine how data is returned.
let fetchRequest = NSFetchRequest(entityName: "NAME_OF_ENTITY")
let sortDescriptor = NSSortDescriptor(key: "NAME_OF_ATTRIBUTE", ascending: true)
fetchRequest.sortDescriptors = [sortDescriptor]