Terminate application on iPad/iPhone?


#1

Hello,

I’m just wondering how an iPad/iPhone application can stop… when I stop the application (double click on home button, then long click on my application icon then click on (-) ), GDB tells me it receives a SIGKILL signal and that’s it… the application don’t stop really…

I’ve tried to call JUCEApplication::getInstance()->systemRequestQuit() without more success…

Any idea?

Many thanks,

Phil.


#2

I think the official Apple instructions are that an app should never decide to quit itself - it should wait until the user presses the home button, and exit that way…


#3

Yes sure, but it is possible to force an application to stop from the multitasking bar, as I described in the previous message…

But ok, I can manage with immortal application :slight_smile: but I need at least to be able to make it disconnected from the network while in background (it is a CopperLan application, so it is continuously active on the network while running). So is there a way with Juce to detect when the application goes in background and come back active again? I’m thinking to handle the window visibility, but it seems to me quite makeshift job… :wink:


#4

oh sorry, I misread your post. Well, the juce demo quits when it calls JUCEApplication::quit(), so I can’t really see why your app wouldn’t…?


#5

I think Apple might refuse your application if it stops itself, as it would not comply with their guidelines.

The good question is, how does JUCE handle the usual callbacks from the application delegate?

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
- (void)applicationWillResignActive:(UIApplication *)application
- (void)applicationDidEnterBackground:(UIApplication *)application
- (void)applicationWillEnterForeground:(UIApplication *)application
- (void)applicationDidBecomeActive:(UIApplication *)application
- (void)applicationWillTerminate:(UIApplication *)application
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application

#6

They get handled like on all the other platforms, e.g. being asked to terminate invokes JUCEApplication::systemRequestedQuit, etc.