Swift asynchronous web calls
I have written in the past about retrieving xml from asynchronous web service calls in Android Studio. In XCode / Swift there is no need to set up an entire class as an async task to retrieve data. You can interrupt viewDidLoad, retrieve your JSON data (including handling errors such as no connection) then resume your task like this: let url = URL(string: “https://yourwebservice”)! let task = session.dataTask(with: url, completionHandler: { (data, response, error)…