Recipe: Background Transfers

iOS 7 introduced an amazing feature that has been on many developers’ wish lists since the creation and availability of the SDK: the ability to continue and process a download or upload even when the application is in the background. Background transfers require the use of a delegate for event delivery. You can use either the upload or download tasks and their corresponding delegates. Background transfers are also limited to HTTP and HTTPS protocols. They can be created in the foreground or even when the app is already in the background.

In many ways, there is little difference between the creation and handling of an in-process transfer and of an out-of-process transfer. You set up your session and your download ...

Get The Core iOS Developer’s Cookbook, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.