我正在尝试将Apple Event发送到另一个进程,并收到一条错误消息,指示我没有适当的权利:
Prompting policy for hardened runtime; invalid entitlement for responsible={identifier=com.ishaangandhi.ishan, pid=1595, auid=501, euid=501, responsible_path=/path/to/my/Shell Notebook, binary_path=/path/to/my/Shell Notebook.app/Contents/MacOS/Shell Notebook}, accessing={identifier=com.barebones.bbedit-tool, pid=1613, auid=501, euid=501, binary_path=/Applications/BBEdit.app/Contents/Helpers/bbedit_tool}, requesting={identifier=com.apple.appleeventsd, pid=303, auid=55, euid=55, binary_path=/System/Library/CoreServices/appleeventsd},
我的Info.plist中具有以下值:<dict>
<key>NSAppleEventsUsageDescription</key>
<string>Allow Shell Notebook to run Apple scripts.</string>
<key>NSAppleScriptEnabled</key>
<string>YES</string>
</dict>
这是我的titles.plist中的 key : <key>com.apple.security.automation.apple-events</key>
<string>YES</string>
我还需要发送什么其他Apple事件?当我尝试发送它们时,与其他应用程序不同,永远不会提示用户允许它们。如果有所作为,这是一个 Electron 应用程序。
最佳答案
几个小时后解决了该问题:
<key>com.apple.security.automation.apple-events</key>
<string>YES</string>
将失败。 <key>com.apple.security.automation.apple-events</key>
<true/>
作品。
关于xcode - 发送Apple Event的“Prompting policy for hardened runtime; invalid entitlement”错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65404011/