Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Entitlement Keys/Access Groups for Scripting Targets

I can't seem to figure out how to identify what entitlement keys are available for a given app. How does one query an application for its entitlement keys?

Example: iTunes has these entitlement keys: com.apple.iTunes.playerInfo, com.apple.iTunes.library.read-write, & com.apple.iTunes.playback

But if I didn't already know this, how could I have retrieved these keys from the iTunes application? What about 3rd-party (non-Apple) apps? Where would one find entitlement keys, if there are any, for those?

Thanks in advance!

like image 204
William Gustafson Avatar asked Feb 12 '23 07:02

William Gustafson


1 Answers

You have to look at iTunes's scripting definition (sdef) file. iTunes's is in a weird place (/System/Library/Frameworks/Foundation.framework/Versions/Current/Resources/com.apple.iTunes.sdef, as mentioned in this answer). If you look inside Mail's (or a 3rd party app's) package, and browse to Contents/Resources directory, you should see an sdef file there too.

You can also use the AppleScript Editor's Open Dictionary menu item and command-click on the proxy icon in the title bar to view a temporary copy of the sdef, which works the same way for iTunes and any other app.

Once in the sdef file (using any text editor), you want to look for all of the <access-group /> tags to see which scripting targets the app exposes.

like image 169
Dov Avatar answered Feb 19 '23 21:02

Dov