Hello,
I am developing a macOS menu bar window-management utility (similar in functionality to Magnet / Rectangle) that relies on the Accessibility (AXUIElement) API to move and resize windows and on global hotkeys.
I am facing a consistent issue when App Sandbox is enabled.
Summary:
App Sandbox enabled
Hardened Runtime enabled
Apple Events entitlement enabled
NSAccessibilityDescription present in Info.plist
AXIsProcessTrustedWithOptions is called with prompt enabled
Observed behavior:
When App Sandbox is enabled, the Accessibility permission prompt never appears.
The app cannot be manually added in System Settings → Privacy & Security → Accessibility.
AXIsProcessTrusted always returns false.
As a result, window snapping does not work.
When App Sandbox is disabled:
The Accessibility prompt appears correctly.
The app functions as expected.
This behavior occurs both:
In local builds
In TestFlight builds
My questions:
Is this expected behavior for sandboxed macOS apps that rely on Accessibility APIs?
Are window-management utilities expected to ship without App Sandbox enabled?
Is there any supported entitlement or configuration that allows a sandboxed app to request Accessibility permission?
Thank you for any clarification.
Topic:
Privacy & Security
SubTopic:
General