1

我正在构建本机扩展,当我尝试从使用此本机扩展的 Flex Mobile 应用程序运行 SWF 时,即使默认包可用,它也无法加载。它没有给我任何错误。我可以在模拟器中启动它,一切正常。

构建扩展时,我的目录结构如下(将我的公司名称替换​​为第三方)

build/
   ThirdParty.framework
   ThirdParty.swc
   default/
       library.swf (This is from a flex library project that is just a stub for the ANE)
   ios/
       library.swf (This is from a flex library project that connects with libThirdParty.a)
       libThirdParty.a
       ThirdParty.bundle
       platformoptions.xml

这是我运行来构建它的命令:

adt -package -target ane ThirdParty.ane extension.xml -swc ThirdParty.swc -platform iPhone-ARM -platformoptions ios/platformoptions.xml ./ThirdParty.framework -C ios . -platform iPhone-x86 -platformoptions ios/platformoptions.xml ./ThirdParty.framework -C ios . -platform default -C default .

这是我的 extension.xml

<extension xmlns="http://ns.adobe.com/air/extension/3.8"> 
    <id>com.thirdparty.sdk</id> 
    <versionNumber>0.0.1</versionNumber> 
    <platforms>
        <platform name="iPhone-ARM"> 
            <applicationDeployment> 
                <nativeLibrary>libThirdPartyAirSDK.a</nativeLibrary> 
                <initializer>ThirdPartyExtensionInitializer</initializer>
                <finalizer>ThirdPartyExtensionFinalizer</finalizer>
            </applicationDeployment>
        </platform>
        <platform name="iPhone-x86"> 
            <applicationDeployment> 
                <nativeLibrary>libThirdPartyAirSDK.a</nativeLibrary> 
                <initializer>ThirdPartyExtensionInitializer</initializer>
                <finalizer>ThirdPartyExtensionFinalizer</finalizer>
            </applicationDeployment>
        </platform>
        <platform name="default">
            <applicationDeployment/>
        </platform>
    </platforms> 
</extension>

我的平台选项:

<platform xmlns="http://ns.adobe.com/air/extension/3.8"> 
    <sdkVersion>6.1</sdkVersion>
    <linkerOptions> 
            <option>-framework ThirdParty</option> 
            <option>-liconv</option> 
    </linkerOptions>
    <packagedDependencies> 
        <packagedDependency>ThirdParty.framework</packagedDependency> 
    </packagedDependencies>
</platform>

笔记:

  • 我已经下载并覆盖了 AirSDK 3.9,但如果我使用 3.9 命名空间,它会抱怨。(即使我使用 3.9 应用程序命名空间时它没有抱怨)
  • ios 扩展工作得很好,它让默认扩展运行失败
  • 如果我在 AIR 设备模拟器中使用它运行项目,我会收到以下错误

错误:

Process terminated without establishing connection to debugger.

Not supported native extensions profile

Launch command details:  "/Applications/Adobe Flash Builder 4.7/sdks/4.6.0/bin/adl" - runtime "/Applications/Adobe Flash Builder 4.7/sdks/4.6.0/runtimes/air/mac" -profile extendedMobileDevice -screensize 640x920:640x960 -XscreenDPI 326 -XversionPlatform IOS -extdir "/Users/username/Documents/Adobe Flash Builder 4.7/.metadata/.plugins/com.adobe.flexbuilder.project.ui/ANEFiles/ThirdPartyGameApp/macosx/" /Users/username/src/github.com/thirdparty/ThirdPartyGameApp/bin-debug/ThirdPartyGameApp-app.xml /Users/username/src/github.com/thirdparty/ThirdPartyGameApp/bin-debug 
4

0 回答 0