Skip to main content
Participant
November 27, 2011
Question

iOS Native Extension with external Framework

  • November 27, 2011
  • 2 replies
  • 6559 views

Hi there,


I am developing a native extension for iOS based CityGrid framework. I compiled .a file and packaged it to ANE file. However when I am trying to compile the app, compiler shows me the error:


Error occurred while packaging the application:


Undefined symbols:

  "_OBJC_CLASS_$_CityGrid", referenced from:

      __objc_classrefs__DATA@0 in libcom.example.SomeAPI.a(SomeAPI.o)

ld: symbol(s) not found

Compilation failed while executing : ld64


I tried few options in XCode. However I still have the error.


Is anybody tried to do a native extension with external frameworks?

This topic has been closed for replies.

2 replies

March 14, 2012

How did you compile your ane file? I met same issue before.

adt -package -target ane myextension.ane extension.xml -swc mySwc.swc -platform iPhone-ARM library.swf libmylib.a -platformoptions myplatformoptions.xml

lnside myplatformoptions.xml, I linked all the framework and shared libraries, as following

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

     <sdkVersion>5.1</sdkVersion>

     <linkerOptions>

          <!-- to use the CoreMotion framework -->    

          <option>-framework CoreMotion<option>

          <!-- to link with the libiconv.dylib -->

          <option>-liconv</option>

     </linkerOptions>

</platform>

Please let me know, if it does work.

March 15, 2012

I used the following command

<Path to ADT tool> -package -target ane <ANE FILE NAME> extension.xml -swc <ACTIONSCRIPT.SWC> -platform <PLATFORM> -C <COMPILATION FOLDER> . -platformoptions <PATH TO OPTIONS.XML>

pigiuz
Participant
March 15, 2012

is this problem resolved? i'm getting the same error here

Participant
November 29, 2011

Hey Andrey,

You can actually include external frameworks using the -platformoptions flag when packaging the ANE. I found this website particularly useful.

http://blogs.adobe.com/rajorshi/2011/11/16/ios5-support-for-airusing-external-sdks-to-package-apps/

Cheers,

Luke.

Participant
December 19, 2011

Looks like we made step to the solution. However I got new issues:

arm function not 4-byte aligned for .a libraries from Flex

http://content.screencast.com/users/avzakharoff/folders/Jing/media/e1eccbaf-d17a-46c4-aee1-23ee8ef70fde/00000605.png

December 20, 2011

Hi Andrey,

Getting these warnings is a known issue. However, despite these warnings, you shall be able to package the ipa. Please check your bin-debug folder for the ipa.

Thanks,

Neha