Before we delve into migration strategies and techniques, I would like to take a step back to remind ourselves of the reasons behind undertaking a migration. Swift 6 doesn’t change how Swift Concurrency works fundamentally compared to Swift 5.x, but it does enforce the existing rules much more strictly.
Stricter Concurrency rules enforcement
Swift 6 comes with strict concurrency checking. This more stringent enforcement helps catch potential bugs at compile time that previously would only show up at runtime, or worse, go unnoticed entirely. While your existing code might have worked fine in Swift 5, it might now fail to compile in Swift 6 due to these additional checks. This is why it’s necessary to migrate your code in the first place.
We can’t migrate to those stricter rules in one go. Well, you can, but you would end up with hundreds of errors and warnings. It’s required to have a step-by-step migration strategy that allows you to migrate pieces of code individually. Eventually, you’ll end up with a project that’s ready for Swift 6 and its strict concurrency checking.
Warnings turn into errors
You’ve probably seen many warnings mentioning:
this is an error in the Swift 6 language mode
In other words, something that’s a warning in Swift 5 will be enforced as an error in Swift 6 due to stricter rules. These changes ensure that your code is thread-safe by design. While it may feel annoying at first to fix all the new errors and warnings, the end result is code that is safer, easier to reason about, and more maintainable.
Swift 6 is the start of the future
Swift 6 is just the beginning of what’s ahead for the language. Delaying migration means you risk missing out on new concurrency features and improvements that build on this stricter foundation. We have to migrate our projects, even though Apple doesn’t enforce us yet.
I’m purposely mentioning yet here as you might know that projects using e.g. Swift 3 no longer compile in the latest Xcode version. I’m fairly certain that we will eventually be forced to have our projects run on at least Swift 6 or later.
Summary
In short, migrating to Swift 6’s concurrency model isn’t just about fixing warnings—it’s about writing safer, more predictable code and staying future-proof. Your project will become more robust with compile-time safety for any threading issues you would’ve otherwise introduced.
Luckily, you don’t need to flip the Swift 6 switch immediately. With a proper strategy, you can adopt strict concurrency checking gradually while still compiling under Swift 5. This is precisely what this course module is about, and what we’ll cover in the following few lessons.