When developing for iOS, you should be aware of a setting that will allow you to completely exit your application rather than just suspend to the background (due to the iOS 4.0 multitasking features allowing you to move quickly between your applications). There’s a key that can be specified in your AIR app-descriptor.xml iPhone section to do this, that when set to true will inform the device that it should completely exit the application rather than suspend it (when the user hits the home button to go to another application for instance). The flag is called UIApplicationExitsOnSuspend and requires a Boolean value. The definition for this flag from the Apple docs says:
UIApplicationExitsOnSuspend (Boolean – iOS) specifies that the application should be terminated rather than moved to the background when it is quit. Applications linked against iOS SDK 4.0 or later can include this key and set its value to YES to prevent being automatically opted-in to background execution and application suspension. When the value of this key is YES, the application is terminated and purged from memory instead of moved to the background. If this key is not present, or is set to NO, the application moves to the background as usual. This key is supported in iOS 4.0 and later.
HOWEVER, one important thing to note is that when you’re setting this value in your app-descriptor, you need to use a value of true or false versus YES or NO because the YES/NO will resolve to a String based on the examples I’ve seen. Instead your app-descriptor needs to have this key included within the iPhone section such as the following:
<iPhone> <InfoAdditions><![CDATA[ <key>UIDeviceFamily</key> <array> <string>1</string> <string>2</string> </array> <key>UIApplicationExitsOnSuspend</key> <true/> ]]></InfoAdditions> <requestedDisplayResolution>high</requestedDisplayResolution> </iPhone>