views:

321

answers:

1

Okay, I'm trying to implement fast switching on my app, and if I don't have to execute any background code / save any user data, do I really even need to do anything ? Or do I just upgd to iPhone SDK 4.0, click compile, and deploy?

Is there any way to simulate an out of memory exception, make the OS purge the application to test how it's being relaunched?

Thanks,
Teja.

+2  A: 

If all you want is fast-user switching, I found that recompiling with the iOS4 SDK is sufficient in order to make your app 'fast-switch ready.' You just need to make sure your app can deal with memory warnings and being able to restore any data you had to release as a result of a memory warning.

The easiest way to simulate a memory warning is through the iPhone simulator, under Hardware -> Simulate Memory Warning. Personally, I used the Mac OSX Keyboard preferences to set a hot-key for that menu item so I can quickly simulate memory warnings on my app.

mdizzle