“Operation not permitted” when execute shell scrip

2019-08-05 05:34发布

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

2条回答
Juvenile、少年°
2楼-- · 2019-08-05 05:55

To turn off sandboxing go to Your target -> Capabilities -> App Sandbox (Turn the switch off)

查看更多
手持菜刀,她持情操
3楼-- · 2019-08-05 05:56

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

查看更多
登录 后发表回答