[英]Killing an app on a jailbroken iPhone
I am currently trying to build an app that will kill other apps on my jailbroken iPhone. 我目前正在尝试构建一个将在越狱的iPhone上杀死其他应用程序的应用程序。 I would like my app to be able to kill apps even when my app is in the background. 我希望我的应用程序即使在后台运行也能够杀死它们。 I only have one problem though I can not find a kill command to do this. 我只有一个问题,尽管找不到杀死命令来执行此操作。 I am a newer programmer so as many details as you can give would be appreciated. 我是一名新手程序员,您将提供尽可能多的详细信息。 Thank You 谢谢
A very simple way (untested, but should work): 一种非常简单的方法(未经测试,但应该可以工作):
system("killall \"NAME-OF-EXECUTABLE\"");
Generally speaking, however, I would recommend using a branch of the exec
functions instead of system
to perform this task. 但是总的来说,我建议使用exec
函数的一个分支而不是system
来执行此任务。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.