With Air 3.0, you can have background music thanks to the UIBackgroundModes UIKit keys (http://developer.apple.com/library/ios/#documentation/general/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html):
Just modify the / src / -app.xml file as follows:
<?xml version="1.0" encoding="utf-8" standalone="no"?> <application xmlns="http://ns.adobe.com/air/application/3.0"> ... <iPhone> <InfoAdditions><![CDATA[ <key>UIDeviceFamily</key> <array> <string>1</string> <!-- app will run on IPhone --> <string>2</string> <!-- app will run on IPad --> </array> <key>UIBackgroundModes</key> <array> <string>audio</string> <!-- audio background mode key --> </array> ]]></InfoAdditions> <requestedDisplayResolution>high</requestedDisplayResolution> </iPhone> </application>
Successfully tested on iPhone 4 and iPad 1.
Of course, you must have an Air 3 SDK to use this feature. Air 3 comes with FB 4.6.
If you are using FB 4.5, the Air Flash SDK must be installed manually in Flash Builder 4.5. Installation Procedure:
1. Find the "old" SDK
They are located in the Flash Builder directory, in my case they were c: \ program (x86) \ adobe \ flash builder 4.5 \ sdks
2. Make a copy of the previous SDK
Copy the previous SDK (I used SDK 4.5.1 for this) and renamed the copied folder to AIR3SDK (or another name if you want)
3. Overwrite the copied (!) SDK using the AIR3 SDK
Copy all files from the AIR3 SDK to the copied folder. He should ask you to overwrite the files a couple of times. After that, you should have the AIR3 SDK work package installed.
4. Name the new SDK
I had to do this with Beta2 - go to the new SDK directory and edit the flex-sdk-description.xml file - change the contents from Flex 4.5.1 to the AIR3 SDK.
5. Add new playerglobal.swc from Flash Player 11
Download the current Flash Player 11 "playerglobal.swc" from http://labs.adobe.com/downloads/flashplayer11.html and place it in the desired folder. From the root folder of the SDK, it was: /frameworks/libs/player/11.0/ (I had to create the 11.0 folder myself, and then just put the file there and rename it to the usual "playerglobal.swc")
6. Add the AIR3 SDK to Flash Builder
In the "Project Settings - Flex Compiler" section for the project, select the new SDK as the SDK to use in the project. If the SDK does not appear, go to "Configuring the Flex SDK", then "Add" and select the newly created folder. The new AIR3 SDK should now be included in the drop-down list as a compiler for this project.
Remember to add -swf-version = 13 as the compiler flag on the same screen.
Having done all this, I was able to use new functions, compile my projects and work well with it
Air 3 SDK procedure source: http://forums.adobe.com/thread/899921