Post

Replies

Boosts

Views

Activity

Comment on Accessing Window Server and other GUI services when running tests via SSH vs LaunchAgent
I've since learned about launchctl asuser, which allows me to launch a process over SSH with an Aqua session, and with stdin/out/err attached: torarne@macos-15-5-0 % ./foo Session ID: 100044 sessionIsRoot: false sessionHasGraphicAccess: false sessionHasTTY: true sessionIsRemote: true ^C torarne@macos-15-5-0 % sudo launchctl asuser 501 ./foo Session ID: 100003 sessionIsRoot: false sessionHasGraphicAccess: true sessionHasTTY: true sessionIsRemote: false ^C
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’25
Comment on Local Network Access Permission requires binary to have LC_UUID load command
It's a reasonable bug, however, IMHO the "fix" here should be to reject the extension as invalid at load time. Executable need to include build UUIDs. Agreed. A clear indication up front (UI or warning/error in system logs or as detailed in the returned error in the network API layer) that the executable can't even ask for network permissions would have helped diagnose this.
Jul ’24
Comment on Key equivalent matching for non-US English keyboard layouts
The reason for the synthetic event not behaving the same as the real key event was that the synthetic event didn't have an eventRef, causing _matchesKeyEquivalent to bail out early. Calling syntheticEvent.eventRef (https://developer.apple.com/documentation/appkit/nsevent/1525143-eventref?language=objc) forces NSEvent to lazily create the eventRef.
Topic: UI Frameworks SubTopic: AppKit Tags:
Oct ’23
Comment on Key equivalent matching for non-US English keyboard layouts
Interestingly, [NSEvent _matchesKeyEquivalent:modifierMask:] returns YES for a real key event: NSEvent: type=KeyDown loc=(21.2695,-129.457) time=78998.2 flags=0x100108 win=0x13227f2c0 winNum=2566 ctxt=0x0 chars="c" unmodchars="ב" repeat=0 keyCode=8 But NO for a synthesized event via [NSEvent keyEventWithType] NSEvent: type=KeyDown loc=(0,0) time=0.0 flags=0x100000 win=0x0 winNum=0 ctxt=0x0 chars="c" unmodchars="ב" repeat=0 keyCode=8
Topic: UI Frameworks SubTopic: AppKit Tags:
May ’23