Skip to main content
January 30, 2012
Question

Native Extension for iOS

  • January 30, 2012
  • 1 reply
  • 1539 views

I have downlaoded a 3rd party native extension for iOS.  The ditribution provides the the source, ANE, and the native extension (*.a) file.  I have added the ANE to the build path and see it referenced under the Native Extension tab under the iOS packaging (though I had to manually select the "Package" checkbox).  I also have the extension.xml associated with the project and I can see the nartivelibrary *.a file referenced.  However, I am not sure what I should so with the native library?  Is there something I need to do to import or reference the file?

When I try to package the app for the iphone to I get an error saying that the implementation for the native extension <name of extension> was not found for the target platform.  This is with the "Package" check box unselected under the Native Exrensions tab.

If I select the check box and then package for the iPhone, I get an exception "Error within Debug UI" and details of "java.lang.reflect.Inovation.TargetException".

Any ideas on what I am doing wrong?

This topic has been closed for replies.

1 reply

Innovatology
Participating Frequently
January 30, 2012

All you need is the .ANE file. It works like a .SWC and should contain everything you need, including the .a file.

You need to add a few lines to your app descriptior XML:

<extensions>

    <extensionID>com.company.extensionid</extensionID>

</extensions>

The ANE should come with some documentation on what needs to go in there. If not, look in the extension.xml file for the correct extensionid.

More info:

http://help.adobe.com/en_US/air/build/WS597e5dadb9cc1e0253f7d2fc1311b491071-8000.html