<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "BackgroundTasks",
  "identifier" : "/documentation/BackgroundTasks/BGProcessingTask",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Background Tasks"
    ],
    "preciseIdentifier" : "c:objc(cs)BGProcessingTask"
  },
  "title" : "BGProcessingTask"
}
-->

# BGProcessingTask

A time-consuming processing task that runs while the app is in the background.

```
class BGProcessingTask
```

## Overview

Use processing tasks for long data updates, processing data, and app maintenance. Although processing tasks can run for minutes, the system can interrupt the process. Add an expiration handler by setting [`expirationHandler`](/documentation/BackgroundTasks/BGTask/expirationHandler) for any required cleanup.

Executing processing tasks requires setting the `processing` <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/UIBackgroundModes> capability. For information on setting this capability, see [`BGTaskScheduler`](/documentation/BackgroundTasks/BGTaskScheduler).

Processing tasks run only when the device is idle. The system terminates any background processing tasks running when the user starts using the device. Background refresh tasks aren’t affected.

---

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)