In this video, learn how the URL loading system is the suite of classes and protocols provided by Apple in the iOS SDK for network or server communication from an app on an iOS device out. It provides the means for connecting to servers over the internet and uploading data or parameters, download data as well as managing cookies, caching, and authentication.
- [Instructor] In the first chapter of this series we're going to be talking about the Apple provided URL loading system. There's a few things we want to point out as we get started. One thing, it's provided in the foundation framework by Apple. It's automatically imported into your project, so there's nothing extra you need to do after you create your project. Also, it supports the main protocols of FTP, HTTP, and HTTPS, also FILE, and DATA. They key classes of the URL loading system are URLSession, URL, and URLRequest, the tasks, and the Data that we'll be using to create all of our server queries.
It allows for closures to be able to hand over the responses or delegates. Also, the URL loading system supports authentication and credential, caching, and cookies. The URL loading system can handle background downloads for any content updates from the service side for your app. A couple of resource we want to point out are the URL loading system website, which you can read about the details of the URL loading system and its classes, specifically the NSURLSession class, that primarily handles the service side requests and response handling.
Also, the Apple developer documentation provides a good overview of the URL loading system. Also, it's a good idea to keep up to date on what's available from Apple, at their developer website.
- Fetching data
- Managing text, JSON, and binary data
- Downloading files to the file system
- Request and response handling with Alamofire
- Encoding parameters
- Uploading and downloading files
- Reporting upload and download progress