Wednesday, October 13, 2010

Flash Builder 4 + iphone packager

1) create actionscript project
2) code AS
3) compile > test > SWF
3a) Create application.xml (refer to below)
4) PFI + .mobileprovision + .p12 + all necessary files > IPA
eg.:
pfi.bat -package -target ipa-test -provisioning-profile "MyApp.mobileprovision" -storetype pkcs12 -keystore "iphone_dev.p12" HelloWorld.ipa application.xml MyApp.swf
Default.png icons [and other files or folders]
5) install .mobileprovision in itunes if not done so. File > Add to library. sync iphone
6) add IPA to itunes. sync.

application.xml:
<?xml version="1.0" encoding="utf-8"?>
<application xmlns="http://ns.adobe.com/air/application/2.0">
<id>com.myDomain.MyApp</id>
<filename>HelloWorld</filename>
<name>HelloWorld</name>
<version>1.0</version>
<initialWindow>
<content>MyApp.swf</content>
<fullScreen>true</fullScreen>
<autoOrients>false</autoOrients>
<aspectRatio>portrait</aspectRatio>
<renderMode>cpu</renderMode>
</initialWindow>
<icon>
<image512x512>icons/icon512.png</image512x512>
<image57x57>icons/icon57.png</image57x57>
<image29x29>icons/icon29.png</image29x29>
</icon>
</application>

2 comments:

Unknown said...

Hey, I am wondering if you are having a problem w importing the TouchEvent and other new events from the Flex SDK using an ActionScript Project in Flash Builder 4. I have the imports working as a Flex Project (import flash.events.TouchEvent), but get missing Error 1172 (class not found) when I use an Actionscript Project. Do you know of a trick to use the Flex SDK for importing in this situation? I do not want to use the Flex Project until it's been vetted a bit more for fear of bugs in the UI.

Thought?

Boon said...

hmm. this is new to me. have you tried the new v4.5 of flashbuilder?