简体   繁体   中英

Lion best practice for Accessibility Trusted Processes

I thought that I read somewhere that it was possible to flag an app as AXIsProcessTrusted True inside a plist or entitlement file in Lion. Now that I'm searching for it, I don't see any documentation or best practice update newer than 2008.

Is it possible to make and app AXMakeProcessTrusted in its build (plist etc)?

If so or not, is it still going to require the user authenticating as root as the older docs state in order to enable this?

Finally, I am looking at the sample app UIElementInspector and I don't see anywhere that the app ever calls this function. Why is it trusted then, and/or how can my app get the same level of access as this app with the minimal pain for the user?

I can answer part 3 definitively (not 1 and 2 though): UIElementInspector breaks if you turn on app sandboxing (as I had in my app - after all, the app isn't just for tinkering around). Sandboxing apparently reduces Accessibility to only the local process (presumably unless AXMakeProcessTrusted has been executed successfully).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM