Added support for Swift 6 / Strict Concurrency
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.)
@SomeRandomiOSDev Why all the @MainActor annotations?
@SomeRandomiOSDev Why all the
@MainActorannotations?
@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
@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.
@Zandor300 Could we get a review and potential merge of this?