Skip to content

Port to Swift 6 - #72

Merged
mosherBT merged 24 commits into
masterfrom
71/port-to-swift-6
Oct 21, 2026
Merged

mosherBT merged 24 commits into
masterfrom
71/port-to-swift-6

Conversation

@OlenaPostindustria

@OlenaPostindustria OlenaPostindustria commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Closes #71.
Blocked by #69.

The SDK built in Swift 5 mode, so Swift 6 integrators got no Sendable guarantees from it, and its shared state was not safe under strict concurrency. This PR moves the SDK, its tests, the Swift package and the podspec to Swift 6 language mode with complete concurrency checking.

What Changed

  • The SDK, its tests, Package.swift and the podspec now build in Swift 6 mode.
  • Shared state is now immutable or guarded by a new internal Locked box, since Mutex needs iOS 18.
  • OptableSDK, OptableConfig, EdgeAPI, LocalStorage and OptableIdentifier are checked Sendable. OptableTargeting is @unchecked Sendable.
  • OptableSDK, OptableConfig and OptableTargeting are now final.
  • OptableDelegate and delegate are main-actor isolated, so callbacks run on the main thread.
  • Public completions are @Sendable and marked @preconcurrency, so Swift 5 clients see no new diagnostics.
  • The test target moves to iOS 17, because Xcode 27's XCTest requires it.

@OlenaPostindustria OlenaPostindustria changed the title 71/port to swift 6 Port to Swift 6 Oct 2, 2026
@mosherBT
mosherBT force-pushed the 69/support-xcode-27 branch from a2ca773 to 24bda57 Compare October 21, 2026 19:47
Base automatically changed from 69/support-xcode-27 to master October 21, 2026 20:00
@mosherBT
mosherBT marked this pull request as ready for review October 21, 2026 20:00
@mosherBT
mosherBT requested review from a team as code owners October 21, 2026 20:00
# Conflicts:
#	OptableSDK.podspec
#	OptableSDK.xcodeproj/project.pbxproj
#	Package.swift
#	Source/Core/EdgeAPI.swift
#	Source/Misc/AppTrackingTransparency.swift
#	demo-ios-objc/Podfile.lock
#	demo-ios-swift/Podfile.lock
@mosherBT
mosherBT merged commit c451f7c into master Oct 21, 2026
4 checks passed
@mosherBT
mosherBT deleted the 71/port-to-swift-6 branch October 21, 2026 21:57
@jrosendahl-opt jrosendahl-opt mentioned this pull request Oct 22, 2026
2 of 7 tasks
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.

Port the SDK to Swift 6

3 participants