Skip to main content
Participant
Apr 3, 2014 4:00 PM UTC
Question

Undefined symbols for architecture armv7

Hello,

I'm in the process of creating an ANE for an iOS SDK and I'm encountering issues when using the generated ANE in a test project.

When trying to debug the app on the device via Flash Builder here is the error I'm getting:

Error occurred while packaging the application:

Undefined symbols for architecture armv7:

  "_OBJC_CLASS_$_ASIdentifierManager", referenced from:

      objc-class-ref in com.mycompany.MySDKANE.o

ld: symbol(s) not found for architecture armv7

Compilation failed while executing : ld64

It looks like the error is saying that I've not added the AdSupport.framework when packaging my ANE.

When I look at the ANT script I've implemented I can see that the platform.xml file correctly lists all the iOS frameworks I need.

Here is an excerpt of my ANT script :

[...]

<!-- Package -->

     <target name="package" description="Create the extension package">

          <exec executable="${flex.sdk}/bin/adt" failonerror="true" dir="../temp">

               <env key="AIR_SDK_HOME" value="${flex.sdk}"/>

               <arg value="-package"/>

               <arg value="-target"/>

               <arg value="ane"/>

               <arg value="${name}.ane"/>

               <arg value="../build/extension.xml"/>

               <arg line="-swc swc/${name}.swc"/>

               <arg line="-platform iPhone-ARM -platformoptions ../build/platform.xml -C ios/ ."/>

               <arg line="-platform iPhone-x86 -platformoptions ../build/platform.xml -C iosSimulator/ ."/>

               <arg line="-platform default -C default/ ."/>

          </exec>

        <move file="../temp/${name}.ane" todir="../bin"/>

        <delete dir="../temp"/>

    </target>

[...]

and the content of the platform.xml :

<?xml version="1.0" encoding="utf-8" ?>

<platform xmlns="http://ns.adobe.com/air/extension/13.0">

     <sdkVersion>7.1</sdkVersion>

     <linkerOptions>

          <option>-ios_version_min 5.1.1</option>

          <option>-framework Accelerate</option>

          <option>-weak_framework AdSupport</option>

          <option>-framework CoreGraphics</option>

          <option>-framework Foundation</option>

          <option>-framework QuartzCore</option>

          <option>-framework Security</option>

          <option>-weak_framework StoreKit</option>

          <option>-framework SystemConfiguration</option>

          <option>-framework UIKit</option>

     </linkerOptions>

</platform>

The script runs fine and generates a valide ANE but when I use is in my project I encounter the error above.

Here is my environment:

- Flash Builder 4.7

- AIR SDK 13.0.0.76

- Xcode 5.1 with iOS 7.1

Does anyone have an idea on the source of my problem?

Thank you.

This topic is closed to new replies. Start a new post to keep the conversation going.

15 replies

DesmondK
Participant
Jan 4, 2017 6:33 PM UTC

Did you ever manage to fixed this issue. I'm using Flex 4.6, AIR 14. I can package my ANE but when I try to package my IPA on Windows I get the same type of issue:

     [java]   "_OBJC_CLASS_$_UIVisualEffectView", referenced from:

     [java]       objc-class-ref in libgeolock.mobi.geoscan.ext.GeoScanExt.a(IPDFCameraViewController.o)

     [java] ld: symbol(s) not found for architecture armv7

     [java] Compilation failed while executing : ld64

I've managed to package my IPA with Mac using the -platformsdk flag to my iPhoneOS10.2 SDK. But this is not the ideal solution seeing that our servers are all Windows servers.

If I leave -platformsdk out on Mac I get the following error:

     Id: framework not found ModelIO for architecture armv7

     Compilation failed while executing : ld64

When I try to use -platformsdk on Windows with iPhoneOS.sdk I get the following error:

     [java] Compilation failed while executing : ld64

     [java] ld: library not found for -lgcc_s.1

Any help would be appreciated. I've tried with numerous different versions of AIR but this introduces a lot of other errors. Thanks in advance.

Here is my platformoptions for iOS:

<platform xmlns="http://ns.adobe.com/air/extension/14.0">

    <sdkVersion>8.0</sdkVersion>

    <linkerOptions>

        <option>-ios_version_min 8.0</option>

        <option>-lc++</option>

        <option>-ObjC</option>

        <option>-framework AssetsLibrary</option>

        <option>-framework AVFoundation</option>

        <option>-framework CoreMedia</option>

        <option>-framework CoreGraphics</option>

        <option>-framework CoreVideo</option>

        <option>-framework Foundation</option>

        <option>-framework UIKit</option>

        <option>-framework OnyxKit</option>

        <option>-framework onyx-core</option>

        <option>-framework opencv2</option>

    </linkerOptions>

    <packagedDependencies>

    <packagedDependency>libBarcodeScanner.a</packagedDependency>

    <packagedDependency>Frameworks/OnyxKit.framework</packagedDependency>

    <packagedDependency>Frameworks/onyx-core.framework</packagedDependency>

    <packagedDependency>Frameworks/opencv2.framework</packagedDependency>

    </packagedDependencies>

</platform>

Translate
Participating Frequently
Jan 16, 2017 4:37 PM UTC

Hi,

I have tried the same scenario with shared ANE at my end. Packaging is working fine. Please try out with Latest AIR SDK build (Version 24.0.0.180)

Link: http://www.adobe.com/devnet/air/air-sdk-download.html

Translate
mb_gameaccount
Participating Frequently
Sep 9, 2014 8:04 AM UTC

This is a big blocker for me also. Any update on plans to fix this would be much appreciated.

Translate
Adobe Employee
Sep 10, 2014 11:45 AM UTC

Hi,

Could you please share a sample app with me at govindag@adobe.com<mailto:govindag@adobe.com>.

Thanks

Govinda Gupta

Translate
Aug 12, 2014 2:19 PM UTC

I have the sam issue with Parse SDK. ANE is generated without errors but project compilation fails with error:

Undefined symbols for architecture armv7:

  "_OBJC_CLASS_$_PFPush", referenced from:

My platformoptions.xml is:

<platform xmlns="http://ns.adobe.com/air/extension/3.5">

  <sdkVersion>6.1</sdkVersion>

    <linkerOptions>

        <option>-ios_version_min 5.0</option>

        <option>-framework Parse</option>

    </linkerOptions>

    <packagedDependencies>

        <packagedDependency>Parse.framework</packagedDependency>

    </packagedDependencies>

</platform>

Some help would be greatly appreciated.

Translate
karagoalAuthor
Participant
Apr 4, 2014 1:25 PM UTC

Here is a link to the test ANE  : http://cl.ly/UoKm

I feel that the frameworks I'm specifiying, AdSupport in the platform.xml file, are not taken into account when packaging the ANE.

Some help would be greatly appreciated.

Thank you.

Translate
karagoalAuthor
Participant
Apr 10, 2014 9:34 AM UTC

Hi all, I'm still struggling with this issue.

Some help would be greatly appreciated.

In advance, thank you.

Translate
karagoalAuthor
Participant
Apr 16, 2014 8:47 AM UTC

I looks like AIR SDK 13.0.0.x does not include the -platformoptions when packaging the ANE in the ANT build script.

Just tried with a previous version of the AIR SDK 4.0 and the ANE is created and the iOS frameworks in my platform.xml are finally included.

Someone in the staff can confirm the bug?

Thank you.

Translate