views:

47

answers:

3

I noticed that when the home button is pressed on the iPhone simulator to exit an app and then the app is re-entered it starts off right where it left off. Does this mean that programming persistence is no longer necessary? What if the user presses the power button on their ipod touch?

+1  A: 

I'm not fluent with the details, but my understanding is that the application is put to sleep. Just like closing the lib on a Macbook. Persistence is definitely required because your data is not preserved and therefore a power off or application kill will loose it.

Derek Clarkson
+2  A: 

There are still several cases to mention, which should make it clear that persistence is still necessary!

  • The Target Device doesn't run iOS4
  • The Target Device runs iOS 4 but doesn't support Multitasking (like the iPhone 3G)
  • iOS terminates your background app when it's running out of memory
  • The App crashes
  • The Target device reboots
  • The User manually terminate your app via the "Task Manager"
Henrik P. Hessel
+1  A: 

If you double click the home button you can see the current app running in background, here you can close an app. Hower there are some device that can't support multitasking: iPhone 3g and early iPod touch. Last but not least don't forget that there are a lot of device that still have 3.x iOS version.

Luca Bernardi