<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/URLError/BackgroundTaskCancelledReason-swift.enum",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation8URLErrorV29BackgroundTaskCancelledReasonO"
  },
  "title" : "URLError.BackgroundTaskCancelledReason"
}
-->

# URLError.BackgroundTaskCancelledReason

An enumeration of reasons used to explain the cancellation of a background task.

```
enum BackgroundTaskCancelledReason
```

## Topics

### Cancellation reasons

[`case backgroundUpdatesDisabled`](/documentation/Foundation/URLError/BackgroundTaskCancelledReason-swift.enum/backgroundUpdatesDisabled)

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

[`case insufficientSystemResources`](/documentation/Foundation/URLError/BackgroundTaskCancelledReason-swift.enum/insufficientSystemResources)

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

[`case userForceQuitApplication`](/documentation/Foundation/URLError/BackgroundTaskCancelledReason-swift.enum/userForceQuitApplication)

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

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Escapable`](/documentation/Swift/Escapable)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`Copyable`](/documentation/Swift/Copyable)

[`Hashable`](/documentation/Swift/Hashable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

---

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)