In this session, we learn how to make network requests using the URL Session DownloadTask method.
We implement this by downloading an image from the internet using the downloadTask and loading that image in a UIImageView.
We also learn how to use the URLSessionDownloadDelegate to receive progress updates on the download task and update the progress bar and progress label.
Finally, we learn about some common mistakes including updating UI outside the main thread and also possible retain cycle.
Additional Resources:
Finished Code: https://github.com/EMacco/ios-tutoria...
URLSession DataTask: • iOS Dev 24: Networking with URL Sessi...
Error Handling: • iOS Dev 18: Error Handling (Try|Do|Ca...
Abarian: https://abarian.ng
Concurrency: • iOS Dev 15: Concurrency Explained wit...
Retain Cycles: • iOS Dev 16: Retain Cycle Explained wi...
Say Hi on Social Media:
LinkedIn: / emacco
Twitter: / its_macco