Leave a rating/review
Notes: 08. Conclusion
At this point you made it through the first part, congrats! We started this part by giving an overview of concurrency.
Concurrency is incredibly important at providing a responsive experience to the user. It allows the user to do other things while you’re fetching data in the background and Swift’s concurrency features simplify this for you.
You were also introduced to URLSession and learned that a session is composed of many different components. There’s a configuration object that allows you to customize how the session works. There are also data tasks that actually do the fetch operation. The session manages both the configuration and task.
Sessions work best when using multiple tasks so you should aim to group your tasks together around one URLSession versus creating a new URLSession for each task.
You can also quickly access URLSessions by using the shared property. This is great for simple requests, but it doesn’t provide any means to configure the session.
You’re just getting started, however. In part 2 of the course, you will: dive deeper into data transfers; learn how to handle errors in requests; show download progress; group requests; pause, resume, and cancel downloads.