<!--
{
  "documentType" : "article",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/url-session-background-task-cancellation-reasons",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "URL Session Background Task Cancellation Reasons"
}
-->

# URL Session Background Task Cancellation Reasons

Reasons that indicate why the system canceled a background task.

## Topics

### Cancellation reasons

[`var NSURLErrorCancelledReasonBackgroundUpdatesDisabled: Int`](/documentation/Foundation/NSURLErrorCancelledReasonBackgroundUpdatesDisabled)

A reason that indicates the system canceled the background task because background tasks are disabled.

[`var NSURLErrorCancelledReasonInsufficientSystemResources: Int`](/documentation/Foundation/NSURLErrorCancelledReasonInsufficientSystemResources)

A reason that indicates the system canceled the background task because it lacks sufficient resources to perform the task.

[`var NSURLErrorCancelledReasonUserForceQuitApplication: Int`](/documentation/Foundation/NSURLErrorCancelledReasonUserForceQuitApplication)

A reason that indicates the system canceled the background task because the user force-quit the application.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)