An implementation for the native extension 'file' required by the application was not found for the target platform

advertisements

I'm trying to make my first ANE for iOS and I found a problem trying to compile the .IPA file.

The error I get is:

An implementation for native extension 'XXX' required by the application was not found for the target platform.

where, 'XXX' is the package for my ANE.

Well, I used Flash Build 4.6 with AIR 3.2 SDK to compile a SWC file with all functions I need. I used XCode to compile a .A file with all Objective-C code needed. Both files compiled fine. Than I used ADT to compile the .ANE file. It also worked fine.

My extension.xml file seems ok:

<extension xmlns="http://ns.adobe.com/air/extension/3.1">
    <id>XXX</id>
    <versionNumber>1.0.0</versionNumber>
    <name>ANE_NAME</name>
    <platforms>
        <platform name="iPhone-ARM">
            <applicationDeployment>
                <nativeLibrary>libExtension.a</nativeLibrary>
                <initializer>ExtensionInitializer</initializer>
                <finalizer>ExtensionFinalizer</finalizer>
            </applicationDeployment>
        </platform>
        <platform name="default">
            <applicationDeployment/>
        </platform>
    </platforms>
</extension>

Again, XXX is my extension's package. (like: com.example.myANE)

I'm also using a platform.xml file:

<?xml version="1.0" encoding="utf-8" ?>
<platform xmlns="http://ns.adobe.com/air/extension/3.1">

    <sdkVersion>5.1</sdkVersion>

    <linkerOptions>
        <option>-ios_version_min 4.2</option>
    </linkerOptions>

</platform>

And using the following code to compile the ANE:

adt -package -target ane MyANE.ANE extension.xml -swc MyANE.swc -platform iPhone-ARM -platformoptions platform.xml library.swf libExtension.a -platform default library.swf

It all works great and I have an ANE file.

Well, the project I'm working on already have 4 other ANE's so I don't think something is wrong with the flash part. But when I use ADT to compile an IPA, I get the error.

Anyone have an insight that could help?


You code to compile the ANE doesn't include the signing options. My script to compile is similar than yours but it includes the following arguments:

-storetype pkcs12 -keystore mac.p12

Do not use a windows generated .p12 file if you are compiling on Mac. (The opposite is also true) If it was that, you should be able to see errors on you iOS device's logs (something about not signed ANE that can't be loaded)

Also, remember to extract library.swf each time you compile your .swc project. Then you should clean your mobile project to include the new ANE.