• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

creating ios native extension with 3rd party frameworks

New Here ,
Oct 13, 2014 Oct 13, 2014

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

TOPICS
Development

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 14, 2014 Oct 14, 2014

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 14, 2014 Oct 14, 2014

Copy link to clipboard

Copied

Thank you 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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 28, 2015 Aug 28, 2015

Copy link to clipboard

Copied

LATEST

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines