Category Archives: Adobe AIR

ChartBoost Static Library and Flex Native Extension

During one of the project there was requirement to create a native extension for ChartBoost SDK as explained by Sameer in this post. ChartBoost gives a static library as form of SDK with couple of header files. Using header files in an XCode project I created a static library from which an extension can be easily created using adt. Though the problem was to merge the static library from ChartBoost with the library I created for extension. On top of that the library from ChartBoost had symbols for both armv7 and i386 architecture while for extension we needed only the armv7 architecture.

So the first step was to extract the armv7 library from the ChartBoost static library.

lipo -output libChartBoostarmv7.a -thin armv7 libChartBoost.a

Above commands extracts the armv7 symbols in another static library package. Its very important to specify -thin so we don’t end up with another fat library. We copied libChartBoostarmv7.a and libChartBoostExtension.a in one folder.

mkdir CombinedStaticLib

cp libChartBoostarmv7.a CombinedStaticLib/

cp libChartBoostExtension.a CombinedStaticLib/

Now we extract symbols from both the libraries and combine them using the ar command:

ar -x libChartBoostExtension.a
ar -x libChartBoostarmv7.a
ar -crs libCB.a *.o

libCB.a is the final static library. Using following command one can easily create the ANE file:

Flex_SDK_PATH/bin/adt -package -target ane ../release/ChartBoostExtension.ane extension.xml -swc ChartBoost.swc -platform  iPhone-ARM library.swf libCB.a

I hope you enjoyed some technical process behind the extension we created.


Capture image on a Adobe AIR application running on iOS and save to iOS disk

Some of you could ask why this post as it can be achieved using bitmap data and save to camera roll or to app storage using Byte Array?

So to answer if you save bitmap data to camera roll you can not save a reference to that image in your application in case you want to show creations of the user. Only option is to save it in a directory you have access to either in Application Directory or in Document Directory. If you go with that option you have to use byte array to save the image on the disk. It will work fine if you have small images but it wont work well if you have large image or say an image of screen size of iPhone. Read more »

Adobe AIR Native Extension For Chartboost Advertise Network

This is our first post and there are chances of mistakes so please bear with me.

We got a project from a client to create an ios game from a flash action script 3.0 game. He have bought the game code and given us to modify it so it can be played back on iPhone and iPod. This was not a big deal for a company like us. We made the game and it got approved straight away. So we got another project with a new requirement of displaying ads from chartboost. We have read through Adobe forums and find out about the Native Extension so we made a deal with client. Read more »