How can I know the Apple Event Access Groups used by an application?

本小妞迷上赌 提交于 2019-12-18 05:21:32

问题


Apples' Sandobox is supposed to use Apple Event Access Groups, which allow applications to communicate with each other, as described in the WWDC video "Session 206 Secure Automation Techniques In OS X"

However, what is not mentioned (and I could find no reference to it in Xcode 5.x documentation) is how can I find out which Apple Event Access Groups are defined for a specific application.

For example, if I want my App to communicate with Pages (or Photoshop, or Firefox, etc.), how can I find documentation about its Apple Event Access Groups? Where are they defined, and what tool can I use to find them?


回答1:


Apple Events from sandboxed apps is typically done with Apple Script. There is documentation for the entitlement needed here:

https://developer.apple.com/library/ios/Documentation/Miscellaneous/Reference/EntitlementKeyReference/Chapters/EnablingAppSandbox.html#//apple_ref/doc/uid/TP40011195-CH4-SW25

To find which app provides access groups is a bit of a hassle and there aren't many available. Use terminal and sdef to find out. this will give you an XML which you can read and look for access-group

eg in Console:

sdef /Applications/Mail.app > mail.sdef.xml
open mail.sdef.xml 

Then you'll see the line

<access-group identifier="com.apple.mail.compose" access="rw"/>


来源:https://stackoverflow.com/questions/21636464/how-can-i-know-the-apple-event-access-groups-used-by-an-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!