Allow HID control for the sandboxed app

末鹿安然 提交于 2019-12-06 06:26:19

问题


We're trying to sandbox our app to submit it to the Mac App Store (for the first time). It makes hard use of the lower level Carbon APIs and cannot operate the other way.

When I enabled the sandboxing, some features stopped working and I see this message in the log:

9/14/12 10:51:58.863 PM sandboxd[41243]: ([41237]) MouseRecorder(41237) deny hid-control

Is there any hidden entitlement I could use or we have no chance in the App Store with this app?


回答1:


Even tho I'm several years too late, I assume I can help others looking for the same. It's taken me days wondering why I couldn't connect to the keyboard. Today, the thought of the sandbox hit me, and I finally allowed my app access.

As described here, I added the following to the .entitlements file, and got access.

<key>com.apple.security.device.usb</key>
<true/>

To be specific, and not mislead:

I do not use Carbon; I use IOKit.hid, with Swift.




回答2:


EDIT: See the new accepted answer

Just to answer my own question – it's not possible, there is no workaround and it's unlikely it will be possible in the future.



来源:https://stackoverflow.com/questions/12430449/allow-hid-control-for-the-sandboxed-app

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!