以root身份从Xcode运行

时间:2019-05-23 05:25:27

标签: xcode root cgeventtap

我正在编写键盘重映射软件。从Xcode运行,我得到:

Initializing an event tap.
unable to create event tap. must run as root or add privileges for assistive devices to this app.

我必须进入系统偏好设置->安全和隐私->隐私,然后取消选中然后重新检查输出二进制文件(出现在列表中)。

每次修改并重新运行源代码时,我都必须这样做。

这是一个非常笨拙的开发周期。

我尝试了Debugging in XCode as root,但这不能解决问题。 (实际上,这样做是通过chown-将我修改的任何文件添加到staff来解决的。)

我可以实现更清洁的开发周期吗?

0 个答案:

没有答案
相关问题