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!).
Publishing
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
<application xmlns="http://ns.adobe.com/air/application/2.0">
to
<application xmlns="http://ns.adobe.com/air/application/2.6">
2. the version node needs to be renamed versionNumber
from
<version>.5.572<</version>
to
<versionNumber>0.5.572</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 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?
Hy!
Excelent news!
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
Any idea!?
Thanks!
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[2]) + 1;
versionNumberNode.text = versionNumberArray[0] + "." + versionNumberArray[1] + "." + 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
Hi,
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).
Simon
Hi michelangelo.caprarohttp://forums.adobe.com/people/michelangelo.capraro
I am having hard time to run the compile script. I am getting the following error:
Line: 51
Char: 7
Error: The system cannot find the file specified.
Code: 80070002
Source: (null)
Please guide me what I am doing wrong. I really appreciate your help. Thanks!
AK US,
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.
Manjith
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">
<id>com.flashvt.Chainless140</id>
<name>Chainless140</name>
<versionNumber>1.0</versionNumber>
<filename>Chainless140</filename>
<supportedProfiles>mobileDevice</supportedProfiles>
<initialWindow>
<content>AVIDChainlessChallenge.swf</content>
<title>Chainless140</title>
<fullScreen>true</fullScreen>
<renderMode>gpu</renderMode>
</initialWindow>
<icon>
<image29x29>finalIcons/icon_29x29.png</image29x29>
<image57x57>finalIcons/icon_57x57.png</image57x57>
<image512x512>finalIcons/icon_512x512.png</image512x512>
</icon>
</application>
Hi Manjith
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
@michelangelo.capraro
Thank you so much. Your original post saved me. I will name all of my children after you.
@epicfall
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.
hi guys,
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.
any ideas?
thanx in advance
KBN
@epicfall
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.
Reproducible problem:
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
@michelangelo.capraro
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>
Thanks again!
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
for you.
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:
http://help.adobe.com/en_US/air/build/WS901d38e593cd1bac1e63e3d128fc24 0122-7ff2.html
hey!
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?
Any clues?!
Thanks guys.
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.
yourapp-app.xml
yourapp.swf
(these can be named what ever you have them named)
myCertificates.p12
myProvision.mobileprovision
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!
North America
Europe, Middle East and Africa
Asia Pacific