Declare Swift 6 language mode and document minimum requirements - #18
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Declares Swift 6 language mode officially, replacing the Swift 5 +
-strict-concurrency=completeapproximation. The source already compiles clean under it (#17 fixed the violations); this flips the manifests and documents the minimums.Changes
darwin/mapkit_flutter.podspec—swift_version5.0 → 6.0; dropped-strict-concurrency=complete(subsumed by the language mode), kept-warnings-as-errors.darwin/mapkit_flutter/Package.swift—swift-tools-version5.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
SWIFT_VERSION = 6.0resolved in the pod xcconfig (Xcode 26.6, local)macos-15runner ships Xcode 16)🤖 Generated with Claude Code