Skip to content

Declare Swift 6 language mode and document minimum requirements - #18

Merged
esenmx merged 2 commits into
masterfrom
chore/declare-swift-6-language-mode
Aug 12, 2026
Merged

Declare Swift 6 language mode and document minimum requirements#18
esenmx merged 2 commits into
masterfrom
chore/declare-swift-6-language-mode

Conversation

@esenmx

@esenmx esenmx commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Summary

Declares Swift 6 language mode officially, replacing the Swift 5 + -strict-concurrency=complete approximation. The source already compiles clean under it (#17 fixed the violations); this flips the manifests and documents the minimums.

Changes

  • darwin/mapkit_flutter.podspecswift_version 5.0 → 6.0; dropped -strict-concurrency=complete (subsumed by the language mode), kept -warnings-as-errors.
  • darwin/mapkit_flutter/Package.swiftswift-tools-version 5.9 → 6.0, defaulting SwiftPM consumers to language mode v6.
  • README.md — minimum requirements as a table: iOS 17, macOS 14, Flutter 3.41 / Dart 3.10, Xcode 16+.

Cost to users is zero: the iOS 17 / macOS 14 floor plus Flutter's own Xcode 16+ requirement mean every consumer already has a Swift 6 toolchain. In exchange, data-race safety in the plugin is compiler-enforced rather than flag-approximated.

Test plan

  • Example iOS simulator build green with SWIFT_VERSION = 6.0 resolved in the pod xcconfig (Xcode 26.6, local)
  • Example macOS build green (Xcode 26.6, local)
  • CI (macos-15 runner ships Xcode 16)

🤖 Generated with Claude Code

esenmx and others added 2 commits August 12, 2026 16:42
Native source already compiles clean under Swift 6 strict concurrency
(previous commit fixed it) — this makes the mode official instead of
approximating it with Swift 5 + -strict-concurrency=complete.

- podspec: swift_version 5.0 -> 6.0, drop the now-subsumed
  -strict-concurrency=complete flag (kept -warnings-as-errors)
- Package.swift: swift-tools-version 5.9 -> 6.0, defaults SwiftPM
  consumers to language mode v6
- README: document minimum requirements (iOS 17, macOS 14, Flutter
  3.41/Dart 3.10, Xcode 16+) as a table

Cost to users is zero: the package's iOS 17/macOS 14 floor and
Flutter's own Xcode 16+ requirement mean every consumer already has a
Swift 6 toolchain.

Verified: example iOS simulator + macOS builds green with
SWIFT_VERSION = 6.0 resolved in the pod xcconfig (Xcode 26.6).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
CI's Xcode 16 SDK doesn't yet mark MKLookAroundScene and
MKMapSnapshotter.Snapshot as Sendable, so under Swift 6 language mode
awaiting request.scene / snapshotter.start() from @mainactor code
fails there (newer SDKs annotate these and compile fine, which is why
local Xcode 26.6 passed).

Portable fix: each await moves into a nonisolated static helper that
takes only Sendable value types (coordinate; region/size/scale/flags)
and returns the result as `sending` — the request/snapshotter live
entirely in a disconnected region, so region isolation proves the
transfer safe on both SDK generations. Snapshot options are now built
twice by design: caller-side only for size/mapRect used by the
compositing pass, helper-side for the actual snapshotter. displayScale
==0 sentinel means "leave scale unset" (MapKit main-screen default),
used by the macOS path.

Verified: example iOS simulator + macOS builds green locally
(Xcode 26.6); CI Xcode 16 is the gate this targets.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@esenmx
esenmx merged commit ba7857d into master Aug 12, 2026
7 checks passed
@esenmx
esenmx deleted the chore/declare-swift-6-language-mode branch August 12, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant