How to sandbox a command line tool?

后端 未结 4 1765
灰色年华
灰色年华 2020-12-25 08:17

I\'ve a simple unix tool made by me that launches the main cocoa app from a shell.

I need to sandbox it but when I run it, it crashes with error \"Illegal instructio

4条回答
  •  离开以前
    2020-12-25 08:39

    I was having this exact problem, and it went away when I added an embedded 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

提交回复
热议问题