Search code examples
xcodemacosshell

"Operation not permitted" when execute shell script in mac app


I'm developing the mac applivation on Xcode, I want to execute some shell script,

cp file ~/Library/.....

It always show "Operation not permitted",but I'm sure that it can be execute at terminal.

I'm trying to edit the "Install Owner" and "Install Permissions" inside the Xcode, but it still not work.

Thanks


Solution

  • I solved this problem, it cause from Xcode sandbox mode, it work after turn off it.


    Note, nowadays this is done in Build Settings:

    enter image description here