iOS - Swift 6 Migration
Q2 is rolling out Swift 6 migration guidance for iOS MSDK modules built as
Swift packages over upcoming releases starting with 26.9.0.
Overview
Swift 6 adds stronger compile-time concurrency safety, which helps catch data-race issues earlier and makes module behavior more predictable.
Q2 is adopting Swift 6 because Apple tooling is continuing to move in that direction, and preparing early gives MSDK Module Developers a clearer migration path before any public API changes become mandatory.
The Swift 6 communication rollout begins with 26.9.0. Stage 1 is
informational only and does not require changes to existing MSDK modules.
What is changing in Stage 1
Starting in 26.9.0, Q2 will:
- Enable Swift concurrency warning reporting in CI for the shared iOS app build.
- Start categorizing warnings by module and warning type.
- Add
Sendableconformance to SDK value types inQ2ModuleInterfaces. - Begin migrating internal app and SDK code ahead of any public API breaking changes.
Stage 1 does not change public iOS Mobile SDK APIs used by MSDK modules.
4-Phase plan
The Swift 6 communication rollout begins with 26.9.0, scheduled for
September 2, 2026.
After Stage 1, Q2 will continue folding the migration into upcoming releases. Each later stage will be communicated in the relevant release cycle rather than being treated as a fixed release commitment in this guide.
| Phase | What to expect |
|---|---|
| Phase 1 | Strict concurrency warnings are enabled across internal targets. Sendable conformance is added to SDK value types in Q2ModuleInterfaces. No public API changes are introduced for MSDK modules. |
| Phase 2 | Six closure parameters in public protocols gain @Sendable. Older signatures remain available but are deprecated. |
| Phase 3 | New type-safe [String: JSONValue] overloads are added for lifecycle methods. Older [String: Any?] APIs are deprecated. |
| Phase 4 | Deprecated non-@Sendable closure APIs are removed. Modules still using the older signatures will need to migrate to keep compiling. |
What this means for MSDK Module Developers
For 26.9.0, the practical impact for MSDK Module Developers is:
- No action is required for existing modules in this release.
- No public API changes are introduced in Phase 1.
- You can start preparing early by enabling strict concurrency warnings or testing Swift 6 language mode locally.
- Future phases will include migration guidance before required changes become mandatory.
How to test your module locally
Use the path that matches the phase you are preparing for.
Recommended for Phase 1
For Phase 1, the easiest way to prepare is to keep your current package setup and enable strict concurrency warnings.
This warning-only approach does not require switching the package manifest to Swift tools 6.0.
// swift-tools-version: 5.10
.target(
name: "YourModule",
dependencies: [
// ...
],
swiftSettings: [
.enableUpcomingFeature("StrictConcurrency")
]
)
Prepare for later phases with Swift 6 validation
If you want full Swift 6 compile-time checking before later phases, switch to Swift 6 language mode.
If you switch a package target to .swiftLanguageMode(.v6), update the
manifest to // swift-tools-version: 6.0 as well.
// swift-tools-version: 6.0
.target(
name: "YourModule",
dependencies: [
// ...
],
swiftSettings: [
.swiftLanguageMode(.v6)
]
)
Temporary fallback if Swift 6 is not ready yet
If you move to Swift tools 6.0 but hit blockers while validating under Swift 6, you can temporarily keep the newer manifest and pin the target back to Swift 5 language mode while you work through the warnings.
// swift-tools-version: 6.0
.target(
name: "YourModule",
dependencies: [
// ...
],
swiftSettings: [
.swiftLanguageMode(.v5)
]
)
Common fixes
When you review Swift 6 or strict concurrency warnings, the most common fixes include:
- Add
Sendableto value types such as structs and enums when they cross concurrency boundaries. - Mark closures that cross concurrency boundaries as
@Sendable. - Use
@MainActorfor UI-bound code. - Use
@preconcurrency importfor third-party SDKs that do not yet fully support Swift 6.
What to expect in later phases
As the migration progresses, Q2 will continue to publish:
- Updated migration guidance for each upcoming phase.
- Updated health-report snapshots as progress is measured over time.
- Advance notice before any required API migration step becomes mandatory.