O'Reilly logo

The Core iOS Developer’s Cookbook, Fifth Edition by Rich Wardwell, Erica Sadun

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Recipe: Downloads with Feedback

The block-based factory methods provided by NSURLSession create tasks with a convenient completion handler. When a task is completed, you can process your data and move on. While these methods are simple to use, sometimes you may need more interaction during your download or upload. NSURLSessionDelegate and its family of subprotocols provide more access and configurability to your tasks. The subprotocols include support for the parent NSURLSession-related delegate methods as well as callbacks specific to a general task, data task, or download task.

These delegates provide corresponding data about the progress or state of your session and tasks. Your NSURLSession object maintains a single, common delegate object ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required