I am writing an iPhone app for a Jailbroken IPhone. From the app I want to kill an Apple Core Application like Safari or SMS Messaging. I have tried a number methods:
1. system("/usr/bin/killall AppName");
2.
system("/bin/kill ProcessId");
3. NSString *exec = [NSString stringWithFormat"/usr/bin/killall %@", @"AppName"];
system([exec UTF8String]);
I have shell access to my phone, and I have also tried setting the permissions and owner of my app so it runs as root with no luck. I can use the kill and killall command from the shell when I am logged in as root. Is there an Xcode/Objective C call that I can make to kill a Running IPhone App by Name or PID? For this example/answer please use Safari as the Running App on the iPhone.
Thanks for your help.
1. system("/usr/bin/killall AppName");
2.
system("/bin/kill ProcessId");
3. NSString *exec = [NSString stringWithFormat"/usr/bin/killall %@", @"AppName"];
system([exec UTF8String]);
I have shell access to my phone, and I have also tried setting the permissions and owner of my app so it runs as root with no luck. I can use the kill and killall command from the shell when I am logged in as root. Is there an Xcode/Objective C call that I can make to kill a Running IPhone App by Name or PID? For this example/answer please use Safari as the Running App on the iPhone.
Thanks for your help.