允许对沙盒应用程序进行 HID 控制 [英] Allow HID control for the sandboxed app

查看:50
本文介绍了允许对沙盒应用程序进行 HID 控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试对我们的应用进行沙盒处理以将其提交到 Mac App Store(这是第一次).它很难使用较低级别的 Carbon API,并且不能以其他方式运行.

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

是否有任何我可以使用的隐藏权限,或者我们没有机会在 App Store 中使用此应用程序?

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

推荐答案

即使我迟到了几年,我想我可以帮助其他人寻找相同的东西.我花了几天想知道为什么我无法连接到键盘.今天,我突然想到了沙盒,我终于允许我的应用程序访问.

Even though 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.

此处所述,我将以下内容添加到 .entitlements 文件中,并获得了访问权限.

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

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

要具体,不要误导:

我不使用碳;我使用 IOKit.hid 和 Swift.

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

这篇关于允许对沙盒应用程序进行 HID 控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆