Hi,
M1 - Mac OS 12.0.1.
I am simulating keyboard events targeted to Logic Pro by posting CgEvents.
This works when I launch my app executing the script that is set as the executable for the app within the info.plist (CFBundleExecutable) on the command line, but not when I double click on the app to open it.
I have enabled the app within Privacy & Security > Accessibility > MyApp.app. I've also deleted the accessibility setting, and the app, rebuilt and reenabled to no effect.
In contrast, as the app uses the network, if I enable the Firewall, I'll get an Allow Request. If I disable the Firewall, the Allow Request doesn't show.
I realise that to ship I need to do the code sign/notarize dance, but I'd expect to get a similar prompt as per the Firewall permissions when running on my development machine, and be able to authorise the sending of keystrokes.
Any help very much appreciated!
Thanks,
Stew
Am I correct in thinking that this is the root cause of my problems?
I can’t promise it’s the only cause but it’s definitely something you should fix before going further.
I guess I need to create a native main executable to implement the functionality of the script. Any suggestions as to the best way to do that?
See this post for some code you can adapt to your specific needs. Just hold your nose while you program in C (-:
[Hmmm, I should link to that from my On File System Permissions post. I’m off to do that right now.]
Lemme know how you get along. I’m always interesting in learning about the experiences of folks using alternative development environments.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"