Introduction
In lessons 1 and 2, you learned what Structured Concurrency is and how to use it within the Swift language. You also learned to use actors to ensure concurrent tasks accessing the shared mutable state of an object do so in a safe way.
As you’ve seen, Structured Concurrency is a powerful technique. The real benefits of using it begin to show when working with UIs that need to update once the concurrent work is complete. SwiftUI is no different and provides different tools and APIs to help you update your UI quickly and safely. In this lesson, you’ll explore and use these tools and APIs and gain an understanding of how they work.
Learning Objectives
In this lesson, you’ll learn to:
- Utilize async/await and actors to manage asynchronous operations and shared mutable state in SwiftUI views and view models.
- Apply techniques to optimize concurrency in your SwiftUI app with Instruments.
- Analyze and apply techniques for testing and debugging concurrent SwiftUI apps.