diff --git a/Package.swift b/Package.swift index 04468d7..837fbf4 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.1 +// swift-tools-version:6.0 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription @@ -21,9 +21,18 @@ let package = Package( .target( name: "OCGoogleDirectionsAPI", dependencies: [], - publicHeadersPath: "."), + publicHeadersPath: ".", + swiftSettings: .completeConcurrencyChecking), .testTarget( name: "OCGoogleDirectionsAPITests", dependencies: ["OCGoogleDirectionsAPI"]), ] ) + +extension Array where Element == SwiftSetting { + static let completeConcurrencyChecking: Self = [.completeConcurrencyChecking] +} + +extension SwiftSetting { + static let completeConcurrencyChecking = Self.unsafeFlags(["-strict-concurrency=complete"]) +} diff --git a/Sources/OCGoogleDirectionsAPI/Client/OCDirectionsAPIClient.h b/Sources/OCGoogleDirectionsAPI/Client/OCDirectionsAPIClient.h index e3ddeb3..5dd4f3e 100644 --- a/Sources/OCGoogleDirectionsAPI/Client/OCDirectionsAPIClient.h +++ b/Sources/OCGoogleDirectionsAPI/Client/OCDirectionsAPIClient.h @@ -12,7 +12,7 @@ #import "RequestURLCreator/OCDirectionsRequestURLCreator.h" #import "RequestURLCreator/OCDirectionsRequestURLCreatorJSON.h" -typedef void (^OCDirectionsRequestCallback)(OCDirectionsResponse *response, NSError *error); +typedef NS_SWIFT_UI_ACTOR NS_SWIFT_SENDABLE void (^OCDirectionsRequestCallback)(OCDirectionsResponse *response, NSError *error); @interface OCDirectionsAPIClient : NSObject