Safer iOS Code with Strict Concurrency & Swift 6
I started preparing one of my iOS & watchOS apps for Swift 6 and strict concurrency.?Here are three things I learned:
1. You can start right now
With Xcode 15.4 and Swift 5.10, you don’t have to wait for Xcode 16 and Swift 6 final release in September.
2. Small steps are possible and totally fine
Bonus: When working with an SPM package, you can opt-in at the target level with the following setting:
swiftSettings: [.enableExperimentalFeature("StrictConcurrency")]
Find out more in the Migrating to Swift 6 guide on swift.org
3. Expect more issues & warnings than you anticipate
Take it easy - you don’t have to resolve all of them in one day. Just get started and commit small and often.
There’s also great content & help provided by Apple, like in this WWDC 2024 video. Starting on the migration soon will prevent you from being overwhelmed by warnings and issues when Xcode 16 is released.
How about you? Have you started migrating to Swift 6 yet?
iOS/Swift Consultant for Porsche, Bosch, Elli, Deutsche Bahn, Siemens and more
8 个月Thanks for sharing this!