Skip navigation
This discussion is archived

Using UIApplicationExitsOnSuspend

3417 Views 3 Replies Latest reply: Sep 11, 2010 11:41 PM by Shnaps RSS
Shnaps Level 1 Level 1 (0 points)
Currently Being Moderated
Sep 11, 2010 7:51 PM
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)
  • RayNewbie Level 5 Level 5 (6,810 points)
    Currently Being Moderated
    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
    iMac, Mac OS X (10.5.8)
  • RayNewbie Level 5 Level 5 (6,810 points)
    Currently Being Moderated
    Sep 11, 2010 11:19 PM (in response to Shnaps)
    Update: I think this Julian Wright post answers your question: [iOS4 multi-tasking and background tasks|http://discussions.apple.com/thread.jspa?messageID=11813366&#11813366]. - Ray
    iMac, Mac OS X (10.5.8)

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.