Skip to content

Port to Swift 6 - #72

Draft
OlenaPostindustria wants to merge 16 commits into
69/support-xcode-27from
71/port-to-swift-6
Draft

OlenaPostindustria wants to merge 16 commits into
69/support-xcode-27from
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
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