I have an app developed using ElectronJS that requires Accessibility permission to monitor mouse and keyboard events through the iohook package. I want to publish it on the Mac App Store, but it seems that:
- The Mac App Store mandates Sandboxing, and
- Sandboxing prohibits Accessibility permission.
As a result, it seems that an app on the Mac App Store cannot obtain Accessibility permission.
Can someone confirm if this is accurate or if there's a workaround?
Hmmm, that depends on what you mean by “Accessibility permission”. That user-level privileges covers a bunch of different code-level facilities.
Sandboxed apps do not have access to all the Accessibility APIs. We call that out Protecting user data with App Sandbox. However, some things that are commonly done by accessibility apps can be done in a sandboxed app.
I have an app developed using ElectronJS that requires Accessibility permission to monitor mouse and keyboard events through the iohook package.
I can’t speak to that specific third-party library, but sandboxed apps can monitor events. My go-to API for that is CGEventTap
.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"