Search code examples
apache-flexadtflex4.6ane

ADT unexpected argument


I'm trying to build ANE and need to specify -platformsdk path_to_ios_sdk argument. But I'm getting unexpected argument -platformsdk. Moreover I've tried to run ADT with any other parameters and they don't work. Why?

adt -connect xxx as example: enter image description here

Is there anything I'm doing in a wrong way?


Solution

  • You shouldn't use the platformsdk option when building the ANE but when building your application using an ANE. The option is invalid for a native extension build.

    When you are building your iOS application you should specify it as below:

    adt -package \
        -target ipa-test \
        -provisioning-profile /path_to_provisioning_profile/Provisioning_Profile.mobileprovision \
        -storetype pkcs12 \
        -keystore /path_to_certificate/certificate.p12 \
        -storepass xxxxx \
        myApp.ipa \
        application_xml_file.xml \
        application_swf.swf \
        -platformsdk PATH_TO_SDK
    

    When you are building your ANE you should make sure you have shared libraries enabled and specify the frameworks your extension is using in the iOS platform options xml file.

    adt -package \
        -storetype pkcs12 -keystore /path_to_certificate/certificate.p12 -storepass xxxxx \
        -target ane extension.ane extension.xml \
        -swc extenion_as_library.swc \
        -platform iPhone-ARM -platformoptions platform.xml -C PATH_TO_IOS_LIB . \
        -platform default -C PATH_TO_DEFAULT_LIB .