I want to check the version of my CS extension at main .mxml init time.
How does one find this version info from the manifest.xml?
AFAIK there is no API exposed by CSXS to get the bundle version. You can read the XML of the manifest and pull out the version though:
private function getExtensionVersion(manifestFile:File):String
var fileStream:FileStream = new FileStream();
var manifestXml:XML = XML(fileStream.readUTFBytes(fileStream.bytesAvailable));
var version:String = getExtensionVersion(basePath.resolvePath('CSXS/manifest.xml'));
Note that basePath is a property on CSExtension.
Hope that helps,
In your MXML file, CSExtension should be the root class. Then you can use "this.basePath":
<csxs:CSExtension xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:csxs="com.adobe.csxs.core.*" applicationComplete="appComplete()">
public function appComplete():void