WWDC24: Migrate your app to Swift 6 | Apple

Поділитися
Вставка
  • Опубліковано 30 чер 2024
  • Experience Swift 6 migration in action as we update an existing sample app. Learn how to migrate incrementally, module by module, and how the compiler helps you identify code that’s at risk of data races. Discover different techniques for ensuring clear isolation boundaries and eliminating concurrent access to shared mutable state.
    Discuss this video on the Apple Developer Forums:
    developer.apple.com/forums/to...
    Explore related documentation, sample code, and more:
    Swift 6 Migration Guide: www.swift.org/migration/docum...
    Updating an app to use strict concurrency: developer.apple.com/documenta...
    Swift concurrency: Update a sample app: developer.apple.com/videos/pl...
    00:00 - Introduction
    00:33 - The Coffee Tracker app
    00:45 - Review the refactor from WWDC21
    03:20 - Swift 6 and data-race safety
    04:40 - Swift 6 migration in practice
    07:26 - The strategy
    08:53 - Adopting concurrency features
    11:05 - Enabling complete checking in the watch extension
    13:05 - Shared mutable state in global variables
    17:04 - Shared mutable state in global instances and functions
    19:29 - Delegate callbacks and concurrency
    23:40 - Guaranteeing data-race safety with code you don’t maintain
    25:51 - Enabling the Swift 6 language mode in the watch extension
    26:35 - Moving on to CoffeeKit
    27:24 - Enabling complete checking in CoffeeKit
    27:47 - Common patterns and an incremental strategy
    29:55 - Global variables in CoffeeKit
    31:05 - Sending an array between actors
    33:53 - What if you can’t mark something as Sendable?
    35:23 - Enabling the Swift 6 language mode in CoffeeKit
    35:59 - Adding a new feature with guaranteed data-race safety
    40:43 - Wrap up and the Swift 6 migration guide
    More Apple Developer resources:
    Video sessions: apple.co/VideoSessions
    Documentation: apple.co/DeveloperDocs
    Forums: apple.co/DeveloperForums
    App: apple.co/DeveloperApp
  • Наука та технологія

КОМЕНТАРІ •