You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/KeyboardShortcuts/NSMenuItem++.swift
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,14 @@ extension NSMenuItem {
56
56
keyEquivalentModifierMask = shortcut.modifiers
57
57
}
58
58
59
-
set()
59
+
// `TISCopyCurrentASCIICapableKeyboardLayoutInputSource` works on a background thread, but crashes when used in a `NSBackgroundActivityScheduler` task, so we ensure it's not run in that queue.
// `TISCopyCurrentASCIICapableKeyboardLayoutInputSource` works on a background thread, but crashes when used in a `NSBackgroundActivityScheduler` task, so we guard against that. It only crashes when running from Xcode, not in release builds, but it's probably safest to not call it from a `NSBackgroundActivityScheduler` no matter what.
174
+
assert(!DispatchQueue.isCurrentQueueNSBackgroundActivitySchedulerQueue,"This method cannot be used in a `NSBackgroundActivityScheduler` task")
175
+
173
176
// Some characters cannot be automatically translated.
0 commit comments