tags:

views:

37

answers:

1

Hi,

I need to kill a running application on iPhone using mobile substrate.Can anybody help me to do so? Or just give me an idea if it is possible or not / if possible how ?

Looking forward ..

Thanks Syam

A: 

use exit(0) whenever you want to terminate the application through code

Edited: (answered by syam)

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

hAPPY cODING...

Suriya
Hey..Thanks for the response..but I need to kill the application from another application which runs in background...am using jailbroken iphone..also I am able to use mobilesubstrate..Any Idea?
syam
Hey..My problem got fixed
syam
Class $SBApplicationController=objc_getClass("SBApplicationController") SBApplication *app=[[$SBApplicationController sharedInstance] applicationWithDisplayIdentifier:displayIdentfier]; if(app) [app kill];
syam
good dat your problem got solved.. bt can i know the reason for downvote?
Suriya
Ok..We are able to get the application display identifier by using spring board header methods.. using the display identifier we get the current application instance.once we get the application instance you can directly kill the application by calling the method kill...
syam
Hope you understood...
syam
I need to kill the app from another app...exit(0) is called from the app itself...
syam
okay so dats the reason for downvote. :O .... Actually i dint saw the word mobile substrate before so.... :)
Suriya