Skip to content

Added support for Swift 6 / Strict Concurrency#437

Open
SomeRandomiOSDev wants to merge 2 commits into
devicekit:masterfrom
SomeRandomiOSDev:somerandomiosdev/strict-concurrency
Open

Added support for Swift 6 / Strict Concurrency#437
SomeRandomiOSDev wants to merge 2 commits into
devicekit:masterfrom
SomeRandomiOSDev:somerandomiosdev/strict-concurrency

Conversation

@SomeRandomiOSDev

Copy link
Copy Markdown
Contributor

This PR adds support for Swift 6 as well as enables strict concurrency in the project.

Appropriate annotations have been added to properties/method that access actor-isolated APIs and Sendable conformances have been added to types provided by the library (e.g. Device, Device.BatterState, etc.)

Comment thread Source/Device.generated.swift Outdated
Comment thread Source/Device.swift.gyb Outdated
@Zandor300 Zandor300 force-pushed the somerandomiosdev/strict-concurrency branch from 51ef2f2 to bbfd0f8 Compare March 20, 2025 09:34
@gabors

gabors commented Mar 20, 2025

Copy link
Copy Markdown

@SomeRandomiOSDev Why all the @MainActor annotations?

@SomeRandomiOSDev

Copy link
Copy Markdown
Contributor Author

@SomeRandomiOSDev Why all the @MainActor annotations?

@gabors The annotations are due to the fact that UIDevice itself is restricted to the @MainActor, meaning that any API that uses it must also be annotated as such. WatchKit’s equivalent WKInterfaceDevice has no such restriction, hence all of the #if declarations

@Kaspik

Kaspik commented May 28, 2025

Copy link
Copy Markdown

@Zandor300 Can we merge this and make a Swift 6 compatible release soon? Swift 6 is becoming a real thing and Swift concurrency is important already.

@SomeRandomiOSDev

Copy link
Copy Markdown
Contributor Author

@Zandor300 Could we get a review and potential merge of this?

@markst

markst commented Feb 25, 2026

Copy link
Copy Markdown

Bump 😅

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.

5 participants