using accessibility api function "AXUIElementCopyElementAtPosition" in a sandboxed app

My application needs to get the element (file or window) being dragged by left mouse click, anywhere in the system. For that I use "AXUIElementCopyElementAtPosition" to get AXUIElementRef. But this function does not work in a sandboxed app. Is there any other way to accomplish my task or can I get temporary entitlement to use that function? Also, how do I request apple for the necessary temporary entitlement? (I have already filed a bug in bugreport.apple.com - bug id: 40927478)

The Accessibility API is not, in general, compatible with sandboxing, so it’s unlikely that your

AXUIElementCopyElementAtPosition
approach will bear fruit. My recommendation is that you post a more general description of the problem you’re trying to solve to the App Frameworks > Cocoa topic area and see if someone has an alternative approach that you can explore.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
using accessibility api function "AXUIElementCopyElementAtPosition" in a sandboxed app
 
 
Q