File tree Expand file tree Collapse file tree 4 files changed +16
-13
lines changed
Sources/SystemExtensionKit Expand file tree Collapse file tree 4 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,10 @@ let package = Package(
2424 dependencies: [ ] ,
2525 path: " Sources " ,
2626 resources: [ . copy( " Resources/PrivacyInfo.xcprivacy " ) ] ,
27- swiftSettings: [ . define( " INCLUDE_SYSTEM_EXTENSIONS_KIT " ) ]
27+ swiftSettings: [ . define( " INCLUDE_SYSTEM_EXTENSIONS_KIT " ) ] ,
28+ linkerSettings: [
29+ . linkedFramework( " SystemExtensions " ) ,
30+ ]
2831 ) ,
2932 . testTarget(
3033 name: " SystemExtensionKitTests " ,
Original file line number Diff line number Diff line change 66//
77
88import Foundation
9- import SystemExtensions
9+ @ preconcurrency import SystemExtensions
1010
1111public extension SystemExtensionKit {
1212 enum ExtensionError : LocalizedError {
@@ -44,7 +44,7 @@ public extension SystemExtensionKit {
4444 }
4545 }
4646
47- enum ExtensionStatus : CustomStringConvertible {
47+ enum ExtensionStatus : Sendable , CustomStringConvertible {
4848 case unknown
4949 case notInstalled
5050 case waitingApproval( OSSystemExtensionProperties )
@@ -124,7 +124,7 @@ public extension SystemExtensionKit {
124124
125125// MARK: - OSSystemExtensionError Code Description
126126
127- extension OSSystemExtensionError . Code : CustomStringConvertible {
127+ extension OSSystemExtensionError . Code : @ retroactive CustomStringConvertible {
128128 public var description : String {
129129 switch self {
130130 case . unknown:
Original file line number Diff line number Diff line change 55// Created by CodingIran on 2023/2/9.
66//
77
8- import SystemExtensions
8+ @ preconcurrency import SystemExtensions
99
1010// Enforce minimum Swift version for all platforms and build systems.
1111#if swift(<5.5)
1212#error("SystemExtensionKit doesn't support Swift versions below 5.5.")
1313#endif
1414
15- /// Current SystemExtensionKit version 2.0.7 . Necessary since SPM doesn't use dynamic libraries. Plus this will be more accurate.
16- public let version = " 2.0.7 "
15+ /// Current SystemExtensionKit version 2.0.8 . Necessary since SPM doesn't use dynamic libraries. Plus this will be more accurate.
16+ public let version = " 2.0.8 "
1717
1818public let SystemExtension = SystemExtensionKit . shared
1919
2020public protocol SystemExtensionRequestUpdating : NSObjectProtocol {
2121 func systemExtensionRequest( _ request: SystemExtensionRequest , updateProgress progress: SystemExtensionRequest . Progress )
2222}
2323
24- public class SystemExtensionKit : NSObject {
24+ public class SystemExtensionKit : NSObject , @ unchecked Sendable {
2525 public static let shared = SystemExtensionKit ( )
2626 override private init ( ) { }
2727
Original file line number Diff line number Diff line change 66//
77
88import os. log
9- import SystemExtensions
9+ @ preconcurrency import SystemExtensions
1010
11- public class SystemExtensionRequest : NSObject {
11+ public class SystemExtensionRequest : NSObject , @ unchecked Sendable {
1212 public let action : SystemExtensionRequest . Action
1313 public let bundleIdentifier : String
1414 public let request : OSSystemExtensionRequest
@@ -159,7 +159,7 @@ private extension SystemExtensionRequest {
159159}
160160
161161public extension SystemExtensionRequest {
162- enum Action : CustomStringConvertible {
162+ enum Action : Sendable , CustomStringConvertible {
163163 case activate( forceUpdate: Bool )
164164 case deactivate
165165 @available ( macOS 12 . 0 , * )
@@ -177,11 +177,11 @@ public extension SystemExtensionRequest {
177177 }
178178 }
179179
180- struct Result {
180+ struct Result : Sendable {
181181 let enabledProperty : OSSystemExtensionProperties ?
182182 }
183183
184- enum Progress {
184+ enum Progress : Sendable {
185185 case submitting
186186 case needsUserApproval
187187 case completed
You can’t perform that action at this time.
0 commit comments