No doubt you’ve noticed updating your old apps that if you don’t just throw up your hands in disgust and do away with it, there’s a surprising deal of complexity sorting out what to do with everything you’d stuffed in -didFinishLaunching and -applicationWillTerminate. How much complexity? Well, courtesy of Dr. Touch, this much complexity:
Yipes! Even if you’re pretty sure you have a handle on things, worth reading through anyway. But beware that there is one inaccuracy, to be found here:
There are only two scenarios left where your app’s applicationWillTerminate: will actually be called: if it’s build with an SDK of less than version 4.0 or if you chose to opt out of backgrounding by adding the UIApplicationExitsOnSuspend key to your info.plist.
There are actually three: running your app under 4.0 on an iPhone 3G or whatever iPod version(s?) it is that don’t allow multitasking, you will get that call as well. So “hardware can multitask” should be a decision immediately under the “SDK >= 4″ decision. Other than that little quibble, good reference!
Continue Reading →JUL