What are the latest advancements in handling background tasks and managing a lot of async tasks?

Asked on 06/13/2025

1 search

At WWDC 2025, Apple introduced several advancements in handling background tasks and managing asynchronous tasks, particularly through Swift concurrency and background task APIs.

  1. Swift Concurrency:

    • The session "Embracing Swift concurrency" highlighted the use of actors to manage state safely across asynchronous tasks. This helps in keeping the main thread responsive by offloading tasks to background threads. The session also discussed the concept of interleaving, where multiple tasks take turns on the main thread, improving performance by efficiently using system resources. Embracing Swift concurrency (10:22).
  2. Background Task APIs:

    • The session "Finish tasks in the background" introduced the BG Processing Task API, which allows apps to perform tasks like running ML models or handling database maintenance in the background. This API supports configurations to minimize battery impact, such as running tasks only when the device is charging and connected to a network. Additionally, the BG Continue Processing Task was introduced to support tasks that need to continue after the app is backgrounded, with system-provided UI to communicate progress. Finish tasks in the background (07:29).
  3. Concurrency in SwiftUI:

    • The session "Explore concurrency in SwiftUI" emphasized separating UI code from asynchronous logic to maintain a responsive user interface. It suggested using state as a bridge between UI and async code, allowing the UI to update synchronously as async tasks complete. This separation also makes it easier to test async code independently from UI logic. Explore concurrency in SwiftUI (07:17).

These advancements provide developers with powerful tools to manage background and asynchronous tasks more efficiently, ensuring apps remain responsive and resource-efficient.

Embracing Swift concurrency

Embracing Swift concurrency

Join us to learn the core Swift concurrency concepts. Concurrency helps you improve app responsiveness and performance, and Swift is designed to make asynchronous and concurrent code easier to write correctly. We’ll cover the steps you need to take an app through from single-threaded to concurrent. We’ll also help you determine how and when to make the best use of Swift concurrency features – whether it’s making your code more asynchronous, moving it to the background, or sharing data across concurrent tasks.

Explore concurrency in SwiftUI

Explore concurrency in SwiftUI

Discover how SwiftUI leverages Swift concurrency to build safe and responsive apps. Explore how SwiftUI uses the main actor by default and offloads work to other actors. Learn how to interpret concurrency annotations and manage async tasks with SwiftUI’s event loop for smooth animations and UI updates. You’ll leave knowing how to avoid data races and write code fearlessly.

Finish tasks in the background

Finish tasks in the background

Discover background execution advancements and understand how the system schedules runtime. We’ll discuss how to get the most out of background runtime to allow your app to deliver features in the background while maintaining a great foreground experience. We’ll also cover how APIs provide background runtime for your app, and how each API is tailored for different use cases — including new APIs in iOS and iPadOS 26 that let your app finish tasks as your app transitions from the foreground to the background.