Copy link to clipboard
Copied
Hello,
I'm new to Air development and creating a ios native extension for my flex mobile project.I want to include third party frameworks such as admob,facebook,chartboost in my ANE
I have tried to link frameworks using packagedDependencies but it dosn't work.(gives me an error telling that "armv7 not supported")
am I doing something wrong? or is there any proper way to link frameworks?
platformoptions.xml
<platform xmlns="http://ns.adobe.com/air/extension/4.0">
<sdkVersion>7.1</sdkVersion>
<linkerOptions>
<option>-ios_version_min 6.1</option>
<option>-framework StoreKit</option>
<option>-framework CoreGraphics</option>
<option>-framework UIKit</option>
<option>-framework Foundation</option>
</linkerOptions>
<packagedDependencies>
<packagedDependency>frameworks/Chartboost.framework</packagedDependency>
<packagedDependency>ios/libAdExtension.a</packagedDependency>
</packagedDependencies>
</platform>
extensionxml
<extension xmlns="http://ns.adobe.com/air/extension/4.0">
<id>com.my.extensions</id>
<versionNumber>1</versionNumber>
<platforms>
<platform name="iPhone-ARM">
<applicationDeployment>
<nativeLibrary>libAdExtension.a</nativeLibrary>
<initializer>ExtInitializer</initializer>
<finalizer>ExtFinalizer</finalizer>
</applicationDeployment>
</platform>
</platforms>
</extension>
-command
/Applications/Adobe\ Flash\ Builder\ 4.7/sdks/4.6.0+airSDK4.0/bin/adt -package -target ane adExtension.ane extension.xml -swc bin/AdsLibrary.swc -platform iPhone-ARM library.swf frameworks/Chartboost.framework ios/libAdExtension.a -C ios . -platformoptions platformoptions.xml
-error
ld: warning: ignoring file /var/folders/3r/x0bh_4.... file was built for unsupported file format ( 0Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_Chartboost", referenced from:
ld: symbol(s) not found for architecture armv7
Compilation failed while executing : ld64
*I used lipo to combine simulator and device .a files
please help
Copy link to clipboard
Copied
From the catalog Chartboost.framework copy the static library file Chartboost(path: Chartboost.framework/Versions/A/Chartboost) and use it instead of .framework :
<platform xmlns="http://ns.adobe.com/air/extension/4.0">
<sdkVersion>7.1</sdkVersion>
<linkerOptions>
<option>-ios_version_min 6.1</option>
<option>-framework StoreKit</option>
<option>-framework CoreGraphics</option>
<option>-framework UIKit</option>
<option>-framework Foundation</option>
</linkerOptions>
<packagedDependencies>
<packagedDependency>frameworks/Chartboost</packagedDependency>
<packagedDependency>ios/libAdExtension.a</packagedDependency>
</packagedDependencies>
</platform>
adt -package -target ane adExtension.ane extension.xml -swc bin/AdsLibrary.swc -platform iPhone-ARM library.swf frameworks/Chartboost ios/libAdExtension.a -C ios . -platformoptions platformoptions.xml
Copy link to clipboard
Copied
Thank you z.abdulgalimov for the answer and I've figured out few errors.
but it gives me the below error telling that declared chartboost file value is invalid
AdsLibrary/platformoptions.xml(14): error 105: platform.packagedDependencies.packagedDependency contains an invalid value
and when I use chartboost.framework itself instead of Chartboost it gives
Error occurred while packaging the application:
Compilation failed while executing : ld64
pls help
Copy link to clipboard
Copied