Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Using UIApplicationExitsOnSuspend

Hi,

I am toying with idea of not letting my app run in the background when the Home button is tapped. I put the UIApplicationExitsOnSuspend property in the info.plist file and checked it's boolean check-box.

In testing, I find that the app terminates fine (the delegate method applicationWillTerminate is indeed called). However, on double-tapping the Home button, the app icon is present. Why? When I tap it, the app is relaunched.

My question is - whether the this is an expected behavior? Or do I have to do something more to not list the app in the list of apps that are in background mode?

Regards,
-Sam-

UIApplicationExitsOnSuspend

iMac, Mac OS X (10.5.5)

Posted on Sep 11, 2010 7:51 PM

Reply
Question marked as Best reply

Posted on Sep 11, 2010 10:51 PM

Hi Sam -
Shnaps wrote:
My question is - whether the this is an expected behavior? Or do I have to do something more to not list the app in the list of apps that are in background mode?

Are we sure the icons in the task window represent background or suspended apps? I think those icons might simply be a list of the most recently active apps. My understanding is that when applicationWillTerminate runs, we can be sure the app is really going away.

That said, have you tried selecting the "Application does not run in background" key and setting it to YES? Of course if my take on the icons is correct, you shouldn't observe any difference by setting the second key, since your app has been terminating all along.

\- Ray
3 replies
Question marked as Best reply

Sep 11, 2010 10:51 PM in response to Shnaps

Hi Sam -
Shnaps wrote:
My question is - whether the this is an expected behavior? Or do I have to do something more to not list the app in the list of apps that are in background mode?

Are we sure the icons in the task window represent background or suspended apps? I think those icons might simply be a list of the most recently active apps. My understanding is that when applicationWillTerminate runs, we can be sure the app is really going away.

That said, have you tried selecting the "Application does not run in background" key and setting it to YES? Of course if my take on the icons is correct, you shouldn't observe any difference by setting the second key, since your app has been terminating all along.

\- Ray

Using UIApplicationExitsOnSuspend

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.