Skip to content

Commit fbee97c

Browse files
committed
Release 1.1.6
1 parent 861261b commit fbee97c

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

Sources/SystemExtensionKit/SystemExtensionKit.swift

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import SystemExtensions
1212
#error("SystemExtensionKit doesn't support Swift versions below 5.5.")
1313
#endif
1414

15-
/// Current SystemExtensionKit version 1.1.5. Necessary since SPM doesn't use dynamic libraries. Plus this will be more accurate.
16-
public let version = "1.1.5"
15+
/// Current SystemExtensionKit version 1.1.6. Necessary since SPM doesn't use dynamic libraries. Plus this will be more accurate.
16+
public let version = "1.1.6"
1717

1818
public let SystemExtension = SystemExtensionKit.shared
1919

@@ -255,7 +255,16 @@ extension SystemExtensionKit: OSSystemExtensionRequestDelegate {
255255
defer {
256256
propertiesContinuation = nil
257257
}
258-
let enabledProperty = properties.first { $0.isEnabled }
258+
var enabledProperty: OSSystemExtensionProperties?
259+
for property in properties {
260+
if property.isEnabled {
261+
enabledProperty = property
262+
break
263+
}
264+
if property.isAwaitingUserApproval {
265+
enabledProperty = property
266+
}
267+
}
259268
propertiesContinuation?.resume(returning: enabledProperty)
260269
}
261270
}

0 commit comments

Comments
 (0)