diff --git a/Sources/KeyboardLayout.swift b/Sources/KeyboardLayout.swift index 8e573f49..4407461f 100644 --- a/Sources/KeyboardLayout.swift +++ b/Sources/KeyboardLayout.swift @@ -5,7 +5,7 @@ class KeyboardLayout { static var id: String? { if let source = TISCopyCurrentKeyboardInputSource()?.takeRetainedValue(), let sourceIdPointer = TISGetInputSourceProperty(source, kTISPropertyInputSourceID) { - let sourceId = unsafeBitCast(sourceIdPointer, to: CFString.self) + let sourceId = Unmanaged.fromOpaque(sourceIdPointer).takeUnretainedValue() return sourceId as String }