Background Task

Asked on 06/17/2025

@wwdc25

1 search

Apple's WWDC 2025 introduced several updates and APIs related to background tasks, particularly focusing on enhancing the efficiency and control of these tasks on iOS and iPadOS. Here are some key points:

  1. Background Tasks on iPad: During the Keynote, it was highlighted that iPads with Apple Silicon can now run long-running and computationally heavy tasks in the background. This allows users to start processes like exports and switch to other apps while the task continues to run.

  2. Background Task APIs: The session titled "Finish tasks in the background" (wwdc2025-227) provides a comprehensive overview of the APIs available for managing background tasks. These APIs allow apps to finish work that may be irrecoverable if interrupted, such as saving state or closing database connections. The session also covers the BG Processing Task API, which enables tasks like running ML models or handling database maintenance in the background.

  3. Continued Processing Tasks: A new feature in iOS and iPadOS 26 is the BG Continue Processing Task, which allows apps to continue work even after being backgrounded. This is particularly useful for tasks initiated by the user, such as exporting files or publishing content. The system provides UI to communicate progress, and users can cancel the work at any time.

  4. Energy and Resource Management: The system prioritizes energy efficiency and resource management, coalescing work when devices wake to minimize unnecessary background activity. Apps are encouraged to keep background tasks minimal and efficient, deferring non-urgent tasks until the device is charging.

  5. Progress Reporting: Apps must actively communicate progress updates to the system. Tasks that do not report progress may be expired, allowing the system to reclaim resources. This ensures that background tasks are managed effectively and do not negatively impact the device's performance.

For more detailed information on these topics, you can refer to the session Finish tasks in the background which covers background task APIs and their implementation.