问题描述
我有一个简单的unix工具,我从shell启动主要的可可应用程序。
I've a simple unix tool made by me that launches the main cocoa app from a shell.
我需要沙箱,但当我运行它,它崩溃与错误非法指令:4,在console.app我可以看到以下错误消息
I need to sandbox it but when I run it, it crashes with error "Illegal instruction: 4", on console.app I can see the following error message
文件使用codesign进行了正确的签名。
The file is correctly signed with codesign.
我已阅读帖子但它不帮助
I've read the post Mac OS app, sandbox with command line tool? but it doesn't help
推荐答案
尝试这些clang标志(假设你有 info.plist
在构建目录中):
Try these clang flags (assuming you have info.plist
in the build directory):
-Xlinker -sectcreate -Xlinker __TEXT -Xlinker __info_plist -Xlinker info.plist
-Xlinker -sectcreate -Xlinker __TEXT -Xlinker __info_plist -Xlinker info.plist
这篇关于如何sandbox命令行工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!