4

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?

mahal tertin
  • 3,239
  • 24
  • 41
LMP32
  • 43
  • 3

1 Answers1

11

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"/>
mahal tertin
  • 3,239
  • 24
  • 41
  • 2
    I submitted a radar at Apple for a GUI for access groups. find a copy of it here http://www.openradar.me/14734642 and submit one as well please. – mahal tertin Feb 10 '14 at 14:04
  • Thank you for your answer. I'd upvote you, but the system tells me I don't have enough reputation points :-/ (I am new to Stack Overflow. This was my first question.) – LMP32 Feb 12 '14 at 08:35
  • It would be nice to have a better way of seeing an app's access groups, but don't sweat it too much. As far as I can tell, there are literally two apps in the entirety of Mavericks that include access groups (Mail and iTunes). Hopefully they'll improve this in future releases. – AriX May 10 '14 at 05:42
  • what if sdef a NOT apple app and it doesn't have ? – stan liu Sep 19 '16 at 07:25
  • @stanliu I just used this answer to discover the scripting targets for Spotify (com.spotify.client). So in 2020 at least, some non-Apple apps also provide this information in the sdef file. As the documentation suggests, using the com.apple.security.scripting-targets key in an entitlements file is preferable to com.apple.security.temporary-exception.apple-events. – daxmacrog Jan 15 '20 at 01:22