how to use @ModelActor with swift concurrency
Asked on 06/16/2025
1 search
To use @ModelActor
with Swift concurrency, you can refer to the session titled "Embracing Swift concurrency" from WWDC 2025. This session provides insights into how to effectively use actors in Swift to manage concurrency, including the use of the mainactor
and other concurrency tools.
In the session, it is explained that actors are used to move data access off the main thread, which helps in improving the performance and responsiveness of your app. The session also discusses the importance of isolating UI-facing classes on the main actor to interact directly with the UI, while non-UI parts of your code, such as network management, can be separated into new actors.
For a detailed understanding of how to implement and use actors, including @ModelActor
, you can watch the session Embracing Swift concurrency (23:18) which covers the topic of actors in depth.

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.

What’s new in Swift
Join us for an update on Swift. We’ll talk about workflow improvements that make you more productive, and new and modernized library APIs for fundamental programming tasks. We’ll show examples of Swift adoption throughout more layers of the software stack. Finally, we’ll explore new language features for both improving approachability of concurrency, and achieving peak performance when you need it.

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.