iOS Swift - Networking
You want to update a label's text after a network call completes. Which is the correct way to handle errors and update the UI safely in Swift?
URLSession.shared.dataTask(with: url) { data, response, error in
// Handle error and update label
}