Instance Method


Tells the URL session that the session has been invalidated.


- (void)URLSession:(NSURLSession *)session didBecomeInvalidWithError:(NSError *)error;



The session object that was invalidated.


The error that caused invalidation, or nil if the invalidation was explicit.


If you invalidate a session by calling its finishTasksAndInvalidate method, the session waits until after the final task in the session finishes or fails before calling this delegate method. If you call the invalidateAndCancel method, the session calls this delegate method immediately.

See Also

Handling Session Life Cycle Changes

- URLSessionDidFinishEventsForBackgroundURLSession:

Tells the delegate that all messages enqueued for a session have been delivered.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software