hey there all,
here is what i am doing so far to use Air 2.6 with Flash CS5. i counts seem to find any help online with this, hope this helps someone...
Setting Up Flash CS5
1. replace Program FIles\Adobe\Adobe Flash CS5\Common\Configuration\ActionScript 3.0\AIR2.0\airglobal.swc with the airglobal.swc in the AdobeAIRSDK\frameworks\libs\air folder of the AIR 2.6 SDK zip file (AdobeAIRSDK.zip)
This lets you compile with the new SDK and use all the new API for camera roll, microphone, etc.
2. replace Program Files\Adobe\Adobe Flash CS5\AIK2.0 with the AdobeAIRSDK folder in the zip file (AdobeAIRSDK.zip) you downloaded from Adobe.
now you can do a test movie in Flash CS5 and it will use the new ADL for testing in Flash (finally works with landscape!).
for publishing, unfortunately you cant use the built-in publish for iOS. i wrote this batch file and use it (also you can write an ant task if you use FDT/Flash Builder). This is for windows 64bit...
"C:\Program Files (x86)\Java\jre6\bin\java" -jar C:\AdobeAIRSDK\lib\adt.jar -package -target ipa-ad-hoc -storetype pkcs12 -keystore [KEYFILE].p12 -storepass [KEY PASSWORD] -provisioning-profile [MOBILE PROVISION FILE].mobileprovision [IPA NAME].ipa [XML FILE NAME].xml [SWF FILE NAME].swf Icon_29.png Icon_48.png Icon_57.png Icon_72.png Icon_512.png Default-Landscape.png Default-Portrait.png Default-PortraitUpsideDown.png Default-PortraitLandscapeLeft.png Default-PortraitLandscapeRight.png
i have a 64bit system so i had to specify the 32 bit JRE and use the ADT jar for packaging. now i just double-click the batch file and it compiles for iOS.
Adjusting the app.xml File
the yourapp-app.xml file needs some tweaks from the CS5 packager to work in 2.6:
1. namespace has to change from
2. the version node needs to be renamed versionNumber
notice you need to include the leading zero if you arent using a whole number version
ok, thats what i have so far, hope this helps...
i dont know why, but this broke my flash it is not launching now! i did a backup of the changed files, and restoring them is not working too!
Is there a way to fix it whitout re-installing?
hmmmm, not sure why that would happen. that file and folder you replace (i should have mentioned to back up the file and folder first) done affect how flash starts up, they are only used for compiling and testing. perhaps you accidentally deleted another file?
I would like to know one thing, which you provided ADT command line is working for me but how to do attachments in the command line because I have more folders to attach with the main file. Now its only publishing the index file without any attachments. Any Idea?
I'm very disappointed that an update for Flash CS5 was not made available to accommodate these new features. These hacks will certainly work but should not be tolerated. A concerted effort should be made to get Flash CS5 up-to-speed.
But I can't run it...
I follow the steps for installing it but I have some kind of error:
When I publish, it says:
/Users/jorge/Desktop/test/testAndroid_2/IphoneTest_2-app.xml: error 102: Invalid namespace http://ns.adobe.com/air/application/2.6
@Sir Jorge Dourado: are you publishing from within Flash CS5? it will not work, i pasted a windows batch script, you will have to make a shell script for OSX to compile. if i have time i will put something together soon.
hey there all, for those on Windows,
here is a compile script i put together for iOS using AIR 2.6. Copy and past this into a file named "compile ios.wsf". All you have to do is double-click and it will compile and paclage your app.
the script assumes you have a versionNumber like: 0.4.123 it takes and incrememnts the build number (the last 3 numbers only) by one. i will imrpove this later.
<?xml version="1.0" ?> <job> <script language="JScript"> /************************************* This file assumes you are using a 3-segment version system. It is not very inteligent, it just increments the last set of numbers in the versionNumber in the XML file by 1. !!be aware that it is not yet smart enough to update the second number!! **************************************/ // these properties change depending on your project var XML_FILE = "YourApp-app.xml"; var SWF_FILE = "YourApp.swf"; var IPA_FILE = "YourApp.ipa"; var TARGET = "ipa-ad-hoc"; var KEY_FILE = "dist.p12"; var KEY_PASSWORD = "PASSWORD"; var PROVISIONING_PROFILE = "YourApp.mobileprovision"; var ICONS = "Icon_29.png Icon_48.png Icon_57.png Icon_72.png Icon_512.png"; var SPLASH_SCREENS = "Default-Landscape.png Default-Portrait.png Default-PortraitUpsideDown.png Default-PortraitLandscapeLeft.png Default-PortraitLandscapeRight.png"; // the location of your JRE/JDK and Air SDK files var JRE_BIN = "C:\\Progra~2\\Java\\jre6\\bin\\java"; var ADT_JAR = "C:\\AdobeAIRSDK\\lib\\adt.jar"; // this stuff shouldnt need to change var objXML = new ActiveXObject( "Microsoft.XMLDOM" ); objXML.async = false; objXML.load(XML_FILE); var root = objXML.documentElement; var versionNumberNode = root.selectSingleNode("versionNumber"); var versionNumberArray = versionNumberNode.text.split("."); var buildNumber = parseInt(versionNumberArray) + 1; versionNumberNode.text = versionNumberArray + "." + versionNumberArray + "." + buildNumber; objXML.save(XML_FILE); var cShell = WScript.CreateObject("WScript.Shell"); var compileCommand = '"' + cShell.CurrentDirectory + '\\compile ios.bat"'; compileCommand = JRE_BIN + " -jar " + ADT_JAR + " -package -target " + TARGET + " -storetype pkcs12 -keystore " + KEY_FILE + " -storepass " + KEY_PASSWORD + " -provisioning-profile " + PROVISIONING_PROFILE + " " + IPA_FILE + " " + XML_FILE + " " + SWF_FILE + " " + ICONS + " " + SPLASH_SCREENS; //WScript.Echo(compileCommand); var runVal = cShell.run(compileCommand, 1, true); </script> </job>
i will see if there's time to do a shell script of OSX and an ANT script for Eclipse...
When i was using the old compiler (flash cs5) my app was running in solid 30fps
Now with this Air 2.6 compiler, it is running with 12-15fps!!!
What im doing wrong in my programming? Is there any trick to fix this!
PLEASE HELP! Thanks!
(on ipad test, it is slow) (on ipod2g, it is reaching 30 but drops a lot to 22)
Message was edited by: Luiz-BR
the one big advantage with 2.6 publishing is, that the app behaves as it should when it comes to moving objects performance slowdown.
Before performance would break down in strange ways if I inserted too many moving objects in my sandbox. Now the framerate just goes down when raising the objects count.
If you want, check out the video of my proto: http://www.youtube.com/watch?v=uE56XCG06FM
I had some bad performance, when i packaged a project that ran fine with the old packager due to a stage scaling issue.
Performance on the ipad seemed to be really bad when publishing a iPhone project without "stage.scaleMode = StageScaleMode.NO_SCALE" with 2.6.
I am actually pretty happy with this release (at the moment).
I am having hard time to run the compile script. I am getting the following error:
Error: The system cannot find the file specified.
Please guide me what I am doing wrong. I really appreciate your help. Thanks!
Try adding \" (double quotes) around java and adt.jar filepath in compile-ios.wsf. May be the script is returning an invalid filepath.
Here is code:
var JRE_BIN = "\"c:\\Program Files\\Java\\jre6\\bin\\java\"";
var ADT_JAR = "\"C:\\Program Files\\Adobe\\Adobe Flash CS5\\AIK2.0\\lib\\adt.jar\"";
It worked for me.
Make sure you set the all the appropriate settings in the descriptor file. When I first tested my latest app in 2.6, it was running really slow for 2 reasons:
1. It was not set to full screen, so when it scaled down it took a processor hit
2. The renderMode was not set to gpu.
Here's waht my descriptor file looks like:
<?xml version="1.0" encoding="utf-8" ?>
<application xmlns="http://ns.adobe.com/air/application/2.6" minimumPatchLevel="0">
Thank you so much. I will try to add \" and let you know if it's working or not.
I tried the following script to create the IPA file and it worked for me.
./adt -package -target ipa-test -storetype pkcs12 -keystore <your p12 file> -storepass <your pass> -provisioning-profile <your mobile provision file> YourApp.ipa YourApp-app.xml YourApp.swf
-storetype pkcs12 -keystore <your p12 file> -storepass <your pass>
-provisioning-profile <your mobile provision file>
I really need some help here, I followed the above steps and when I do a test movie inside of flash nothing happens, the player just appears for a sec then disappears.
Thanks in advance...
Thank you so much. Your original post saved me. I will name all of my children after you.
I had the same problem initially. Then I went Control > Test Movie > In AIR Debug Launcher (Mobile). After that I did Control > Delete ASO Files and Test Movie then it worked.
I have all the correct certifs in place and the correct swf and xml etc and its starts to compile but then asks me for the password which I add
then it spits out:-
The key could not be obtained. You may need to use the -keystore argument with the specified keystore type.
thanx in advance
It turns out that my "solution" was probably unrelated to whatever the problem is. Unfortunately I'm having the same problem as you again: Test Movie doesn't seem to work anymore. It worked once, and then stopped ... forever. We tried deleting ASO files, starting a completely new iOS project and Test Movie-ing that, restarting Flash CS5, and restarting the machine. Can anyone help?
We're running Windows XP SP3. I think I've narrowed it down slightly, in the sense that I can reproduce the problem now.
If I create the new iPhone OS file with the new AIK2.0 folder and airglobal.swc, then "Test Movie" will not work for me. It will show the "Exporting SWF Movie" dialogue, a .swf and -app.xml file will be produced, but the Test Movie window will never appear.
However, if I create the new iPhone OS file with the original AIK2.0 folder and airglobal.swc, "Test Movie" will work (the Capabilities.version will be WIN 10,1,53,32). Then, I close Flash, change to the new AIK2.0 folder and airglobal.swc, reopen Flash, and "Test Movie" again ... Test Movie works. The Capabilities.version is WIN 10,2,153,1. Test Movie will then continue to work for that file no matter how many times it's opened/closed, and despite whatever version of AIK2.0 folder and airglobal.swc.
Strange no? Any ideas how to fix this? @epicfall, I would be interested to see how you go with trying to reproduce this too.
That makes sense. You can't use the publish settings for iOS since it uses the older XML format for air 2.5. Specifically, the namespace and versionnumber node are different in the old air. Do all your app-XML editing outside of flash and use a batch file to publish and it should keep working
You're a genius! I'm running out of children to name after you!
In summary: If you find that "Test Movie" doesn't work for you, check that your -app.xml file has been adjusted as in the original post. ie,
1. namespace must be <application xmlns="http://ns.adobe.com/air/application/2.6">
2. <versionNumber> instead of <version>
SO...has anyone got ideas on how to include an 'assets' folder with this compile?
I can use the batch fine but it doesn't include the 'assets' folder which we need.
Thanks so much to the other posters here though...VERY helpful.
i'm guessing here but i think you may need to add all the items in the
assets folder separately. you could easily modify the script to do that
also, with adt you can specify a folder to add to the build. i havent
needed that functionality, but here is the help info on the command line
arguments for it:
thanks for speedy reply!
I've worked it out via the docs ...silly me.
You just add to the end of the adt command the files or folders you require to be included in the build. bingo!
But....keep getting 'entitlements' error when syncing to the iPad.
Provisioning profile and certificate all worked fine before.
How do you compile the swf out of interest? Just via the test movie command in Flash IDE?
I am still confused on how to get this to work. I can not publish an ipa. This is making me not want to use flash anymore. It seems like if I have to use terminal adobe isn't doing there job.
Why did they stray from the packager. This is not worth the hassle.
hey there tomayz,
what system are you using (osx or windows)? if you follow the intructions above, it will let you test in the new AIR sdk. to publish, do not open and click publish in flash as it will corrupt your new 2.6 app-xml file, so use the the included batch script in this thread if you are on windows.
hope that helps
I finally got it to work. Here is what i learned.
you need to have all 4 files in the bin folder.
(these can be named what ever you have them named)
then open up terminal.
type in "cd" (then a space) then drag your bin folder into it and hit enter.
this will navigate terminal to your bin folder, so termianl runs the command from the right location.
so then it should look something like this
flashstation04:bin tom$ (which tells you its in your bin file)
then run your script. Its important to note there can't be an returns in it. I pasted it in to text edit first and wrote it all out on one line and then pasted it into terminal.
./adt -package -target ipa-test -storetype pkcs12 -keystore myCertificates.p12 -storepass blablabla -provisioning-profile myProvision.mobileprovision yourapp.ipa yourapp-app.xml yourapp.swf
Then it should work!
Europe, Middle East and Africa