A protocol that defines methods that URL session instances call on their delegates to handle task-level events specific to download tasks.
SDKs
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
@protocol NSURLSessionDownloadDelegate
Overview
In addition to the methods in this protocol, be sure to implement the methods in the NSURLSession
and NSURLSession
protocols to handle events common to all task types and session-level events, respectively.
Note
An NSURLSession
object need not have a delegate. If no delegate is assigned, a system-provided delegate is used, and you must provide a completion callback to obtain the data.