on iphone with multitasking and iOS4.1, if i have the debugger connected i noticed that
code is still being run in the background, my breakpoints are still hit, timers are running.
This without any of the background modes set.
Is it the case that having the debugger connected prevents the app from being suspended?
An app can continue running for a short period of time after it's been suspended. You should use the
UIApplicationDelegate methods to check what's going on.
Here's a quote:
applicationDidEnterBackground:Your implementation of this method has approximately five seconds to perform any tasks and return. If you need additional time to perform any final tasks, you can request additional execution time from the system.
Well, since iOS4 there is multitasking. Then, when you enter background, app is still running some things. That's why the debugger is still running ^^
You can avoid multitasking if you want ^^