Skip to content

Commit aef3399

Browse files
committed
(refactor) swift 6.1 upgrade
1 parent 85bc750 commit aef3399

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.10
1+
// swift-tools-version:6.1
22

33
import PackageDescription
44

Sources/SystemWideElement.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import Foundation
22
import Cocoa
33

44
/// A singleton for the system-wide element.
5-
public var systemWideElement = SystemWideElement()
5+
nonisolated(unsafe)
6+
public let systemWideElement = SystemWideElement()
67

78
/// A `UIElement` for the system-wide accessibility element, which can be used to retrieve global,
89
/// application-inspecific parameters like the currently focused element.

Sources/UIElement.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ open class UIElement {
6969
/// happens asynchronously and does not affect the return value.
7070
open class func isProcessTrusted(withPrompt showPrompt: Bool = false) -> Bool {
7171
let options = [
72-
kAXTrustedCheckOptionPrompt.takeUnretainedValue() as String: showPrompt as CFBoolean
72+
"AXTrustedCheckOptionPrompt": showPrompt as CFBoolean // `kAXTrustedCheckOptionPrompt` causes a concurrency build error, so just using raw string here
7373
]
7474
return AXIsProcessTrustedWithOptions(options as CFDictionary)
7575
}

0 commit comments

Comments
 (0)