|By Rich Tretola | December 28, 2010|
Yesterday, I showed my AIRonAndroidBrowser application running on an iPod touch. So, this morning I figured I would try the Flex Tour de Mobile app. Here is exactly how it was done. There is also a video at the end.
- I grabbed the source by downloading and installing the fxp source from here.
- I removed any mentions of CameraUI and StageWebView as the iPhone packager doesn’t currently support these apis.
- I compiled the app to a swf using mxmlc under Flex 4.5.0 SDK. Note, you can’t just use the swf generated by Flash Builder Burrito as it compiles specifically for Android.
1"/Applications/Adobe Flash Builder Burrito/sdks/4.5.0/bin/mxmlc" -load-config "/Applications/Adobe Flash Builder Burrito/sdks/4.5.0/frameworks/airmobile-config.xml" -sp -o TourDeMobileFlex.swf TourDeMobileFlex.mxml
- Now that I have a compatible SWF named TourDeMobileFlex.swf, I can compile to an ipa.
- First, I need to update the TourDeMobileFlex-app.xml so that it only has the minimal config settings and also is set to the AIR 2.0 namespace.
18<?xml version="1.0" encoding="utf-8"?>
- I created a new Default.png, icon57.png, and icon29.png images which I added to the icons folder which was already part of the TourDeMobileFlex source
- Finally, I ran the iPhone packager
1/packagerforiphone/bin/pfi -package -target ipa-test -provisioning-profile happytoadit.mobileprovision -storetype pkcs12 -keystore /certs/HappyToadLLCAppleNew.p12 -storepass ******** TourDeMobileFlex.ipa TourDeMobileFlex-app.xml TourDeMobileFlex.swf Default.png icons
That’s it! The results are a 7mb TourDeMobileFlex.ipa file which I then installed on my iPod touch shown below.