Mi aplicación no ejecutará un comando de interrupción

Ok, so for the past couple of days I have been asking for a lot of kill commands and I appreciate everyone sending me these. Below are the ones that I have tried:

  1. Usr/bin/kill/all

  2. Class $SBApplicationController=objc_getClass("SBApplicationController") SBApplication *app=[[$SBApplicationController sharedInstance] applicationWithDisplayIdentifier:displayIdentfier]; if(app) [app kill]; –

  3. NSString *exec = [NSString stringWithFormat:@"killall %@", executableName]; system([exec UTF8String]);

  4. NSString *exec = [NSString stringWithFormat:@"kill %i", processId]; system([exec UTF8String]);

I have realized that it is not the kill command that is not working, but it appears for some reason my app will not execute the kill command?? I was wondering if anybody knew what the problem was? My app uses the accelerometer to execute an app so maybe that has something to do with it. I have exhaustred all options I can think of so I am asking for some further helpo and guidance.

I am happy to post some sample code if need be. Just let me know if you have any other ideas for me to get the kill command to execute in my app. Thank you.

preguntado el 01 de febrero de 12 a las 03:02

I dont think these will work with ios. even though they are in cocoa, they belong to mac. you are not authorized to kill other apps. if you want to kill your own app, use exit method. -

1 Respuestas

iOS apps each run in their own little protected environment, sometimes called a "sandbox". Apps are barely able to talk to one another, let alone kill one another. You're not going to be able to write an app that kills another app unless you jailbreak your device.

Respondido 01 Feb 12, 11:02

Ok so if I already have jailbroken my device and I have the process ID's of the apps on my phone do you know how I could go about killing them? - user1166132

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.