I loaded some app projects that I had been developing using the iPhone 3.1.3 Simulator. Now I got the 4.0 package, and for some reason when I hit the home button of the simulator to go the home screen and then go back to the app, it's in the same position as I left it. Is this now standard? What if I don't want it to do this? I'd rather have it restart every time.
+1
A:
What you're describing is fast App switching, which is new in iOS 4.
If you want your application to quit each time the user presses the Home button, add the UIApplicationExitsOnSuspend
property key to your info.plist and set it to YES (check the box).
Thomas Müller
2010-07-06 04:11:26
Yeah. My advice, though, is to think long and hard before you introduce non-standard behavior into your application. (I'm sure there are plenty of good reasons to do this.)
Jonathan Sterling
2010-07-06 04:16:23
@jonathan, could you be a little more clear? non-standard?
marty
2010-07-06 21:05:11
Well, the standard way would be to allow fast app switching. You'll have to modify some code in your app delegate (so you can save state when the application goes into the background), but that shouldn't be too much work, and would only benefit the user. My solution disables the standard behaviour.
Thomas Müller
2010-07-06 23:21:28
Thanks, Thomas.
Jonathan Sterling
2010-07-07 16:27:35