Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

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

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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"/>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...