Hi there,
For some reason I have to read some data out of the application descriptor file at runtime. Precisely, I am interested in the UIDeviceFamily tag which indicates whether the app is iPhone / iPod only or if runs on iPad too :
<key>UIDeviceFamily</key>
<array>
<string>1</string>
</array>
I can access the <InfoAdditions> node which is the parent, but I can't go deeper :
var appDescriptor:XML = NativeApplication.nativeApplication.applicationDescriptor;
var ns:Namespace = appDescriptor.namespace();
var iPhone:XML = new XML( appDescriptor.ns::iPhone );
var data:XML = new XML( iPhone.child(0) );
I think that's because the XML is not formatted correctly for the AS3 parser. I tried to use RegEx but I am not that good with those things :-(
var reg:RegExp = /.*?<key>UIDeviceFamily<\/key><array>(.*?)<\/array><key>UIPrerenderedIcon<\/key>/gi;
var s2:String = reg.exec( s1 )[1];
Any advice on this would be welcome !