Apple now require all future apps to be sandboxed and so I followed the instructions to sandbox an app. The build succeeded but then my system(rm -rf ~/.Trash/*) command stopped working. Nothing happened. What I find confusing here is why this system command does not work with App Sandboxing/Entitlements on. Here is are my entitlement settings:
Entitlements: Checked
App Sandboxing: Checked
And here is my current code:
- (void)viewDidLoad {
[self emptyTrash];
}
- (void)emptyTrash {
system(rm -rf ~/.Trash/*);
}
Thanks for your help!
Take a look at documentation.
you can use