iOS CapabilitiesLesson 68Free preview
Background URLSession
This lesson is part of Swift · All levels
Summary
This lesson discusses downloading and uploading large files in the background using Background URLSession. With this configuration, the data transfer will continue to run even if the user leaves the application or the system suspends the application, and the system will wake up the application when the transfer is complete.
Key points
- Configuration 'URLSessionConfiguration.background(withIdentifier:)' activates the background download session
- The network transfer process is delegated to the iOS operating system daemon (nsurlsessiond)
- Downloads continue even when the app is closed or the device locked
- The system calls a delegation 'urlSessionDidFinishEvents(forBackgroundURLSession:)' when the download is complete
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.