0
我正在開發一個使用應用程序腳本的Mac應用程序。這是沙盒,因此需要適當的權利,以獲得發送AppleScript事件到其他應用程序的權限。我得到這個工作正常的應用程序(如Mail和Spotify),它指定訪問組標識符是這樣的:AppleScript應用程序權限爲訪問組標識符=「*」
<access-group identifier="com.apple.mail.compose" access="rw"/>
<access-group identifier="com.spotify.playback"/>
然而,其他一些蘋果的開發的應用(如Xcode中)指定這樣的標識符:
<access-group identifier="*"/>
我試圖配置我的授權文件是這樣的:
<key>com.apple.security.scripting-targets</key>
<dict>
<key>com.apple.dt.Xcode</key>
<array>
<string>*</string>
</array>
</dict>
,但這樣做時,它不工作,我在控制檯收到此錯誤信息:
AppleEvents/sandbox: Returning errAEPrivilegeError/-10004 and denying dispatch of event xcod/buld from process '-------'/0x0-0x1a05a04, pid=82514, because it is not entitled to send an AppleEvent to this process.
有誰知道如何正確配置這個?