非常纠结于 iOS 上的 ADT 打包和 AIR 本机扩展

发布于 2025-01-05 12:04:01 字数 915 浏览 0 评论 0原文

所以我使用 http://blog.aboutme.be/2011/12/10/udp-in-air-for-ios-using-a-native-extension/

它附带了一个 Flex 演示应用程序,在 Android 上完美运行iOS 内置于 FB 中。我在 FB 中制作了一个小型 as3 应用程序,它在 Android 和 iOS 上也能完美运行。

然后,我从 as3 FB 项目中获取了 app.xml 并将其用于我的 flash pro/adt 项目。我使用以下 Android 在 adt 中构建了包

start adt -package -target apk -storetype pkcs12 -keystore androidTest.p12 NetPRO_Demo.apk NetPRO_Demo-app.xml NetPRO_Demo.swf 72icon.png -extdir 扩展

iOS:

start adt -package -目标 ipa-ad-hoc -storetype pkcs12 -keystore Certificates.p12 -provisioning-profile CashRegisteriPad1.mobileprovision NetPRO_Demo.ipa NetPRO_Demo-app.xml NetPRO_Demo.swf 72icon.png -extdir 扩展

Android 版本运行良好,iOS 版本则黑屏并冻结。我花了几天时间研究这个问题,我的 ADT 包装有什么问题,与 FB 包装不同,它只在 iOS 上损坏。

另外,如果我摆脱本机扩展,我的 ADT 打包就可以正常工作。

So I am using the native extension from http://blog.aboutme.be/2011/12/10/udp-in-air-for-ios-using-a-native-ex tension/

It comes with a flex demo app that works perfectly on Android and iOS when built in FB. I made a small as3 app in FB and that works perfect on Android and iOS as well.

I then took the app.xml from the as3 FB project and used it for my flash pro/adt project. I built the package in adt with the following

Android:

start adt -package -target apk -storetype pkcs12 -keystore androidTest.p12 NetPRO_Demo.apk NetPRO_Demo-app.xml NetPRO_Demo.swf 72icon.png -extdir extensions

iOS:

start adt -package -target ipa-ad-hoc -storetype pkcs12 -keystore Certificates.p12 -provisioning-profile CashRegisteriPad1.mobileprovision NetPRO_Demo.ipa NetPRO_Demo-app.xml NetPRO_Demo.swf 72icon.png -extdir extensions

The Android version works perfectly, the iOS version sits at a black screen and freezes. I have spent days on this, what is wrong in my ADT packaging that is different from FB packaging that it breaks only on iOS.

Also, if I get rid of native extensions, my ADT packaging works fine.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

相思碎 2025-01-12 12:04:01

我遇到了同样的问题 - 我的扩展在 Android 上运行正常,在 ipa-test 中运行 iOS,但在使用 ipa-ad-hoc 启动时冻结。

该修复已链接到 iOS 上的 NativeExtension swc 作为外部库。从命令行我必须修改提供给编译器的 config.xml 文件,如下所示:

之前:

<flex-config>
<swf-version>14</swf-version>
<target-player>11.2</target-player>
    <compiler>
        <headless-server>true</headless-server>
        <source-path>
            <path-element>src</path-element>
            <path-element>..</path-element>
        </source-path>
        <library-path>
            <path-element>../Extensions/ExampleExt/bin/iOSExampleExtension.swc</path-element>
            <path-element>${flexlib}/libs/air/airglobal.swc</path-element>
             <path-element>${flexlib}/libs/framework.swc</path-element>
        </library-path>
    </compiler>
</flex-config>

之后:

<flex-config>
<swf-version>14</swf-version>
<target-player>11.2</target-player>
    <compiler>
        <headless-server>true</headless-server>
        <source-path>
            <path-element>src</path-element>
            <path-element>..</path-element>
        </source-path>
        <external-library-path>
            <path-element>../Extensions/Telephony_iOS/bin/iOSTelephonyExtension.swc</path-element>
        </external-library-path>
        <library-path>
            <path-element>${flexlib}/libs/air/airglobal.swc</path-element>
             <path-element>${flexlib}/libs/framework.swc</path-element>
        </library-path>
    </compiler>
</flex-config>

希望这也能解决您的问题。

I had the same problem - my extension worked OK on Android, and iOS in ipa-test, but froze on launch with ipa-ad-hoc.

The fix was link to the NativeExtension swc on iOS as an external library. From the command line I had to modify my config.xml file supplied to the compiler as follows:

BEFORE:

<flex-config>
<swf-version>14</swf-version>
<target-player>11.2</target-player>
    <compiler>
        <headless-server>true</headless-server>
        <source-path>
            <path-element>src</path-element>
            <path-element>..</path-element>
        </source-path>
        <library-path>
            <path-element>../Extensions/ExampleExt/bin/iOSExampleExtension.swc</path-element>
            <path-element>${flexlib}/libs/air/airglobal.swc</path-element>
             <path-element>${flexlib}/libs/framework.swc</path-element>
        </library-path>
    </compiler>
</flex-config>

AFTER:

<flex-config>
<swf-version>14</swf-version>
<target-player>11.2</target-player>
    <compiler>
        <headless-server>true</headless-server>
        <source-path>
            <path-element>src</path-element>
            <path-element>..</path-element>
        </source-path>
        <external-library-path>
            <path-element>../Extensions/Telephony_iOS/bin/iOSTelephonyExtension.swc</path-element>
        </external-library-path>
        <library-path>
            <path-element>${flexlib}/libs/air/airglobal.swc</path-element>
             <path-element>${flexlib}/libs/framework.swc</path-element>
        </library-path>
    </compiler>
</flex-config>

Hopefully this will fix your problem too OP.

带刺的爱情 2025-01-12 12:04:01

其余文件之前似乎缺少参数 -C 。尝试:

start adt -package -target ipa-ad-hoc -storetype pkcs12 -keystore Certificates.p12 -provisioning-profile CashRegisteriPad1.mobileprovision NetPRO_Demo.ipa NetPRO_Demo-app.xml -C NetPRO_Demo.swf 72icon.png -extdir 扩展

如果这不能解决问题,我敢打赌你的临时个人资料不适合分发,而你正在尝试将其打包以供临时使用。也许尝试不同的配置文件或将包装更改为ipa-debug-interpreter
另外,它是否要求密码?也许也添加 -storepass *yourpass* 和 iphone sdk -platformsdk /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/

it seems to be missing a parameter -C before the remaining files. try:

start adt -package -target ipa-ad-hoc -storetype pkcs12 -keystore Certificates.p12 -provisioning-profile CashRegisteriPad1.mobileprovision NetPRO_Demo.ipa NetPRO_Demo-app.xml -C NetPRO_Demo.swf 72icon.png -extdir extensions

if that doesnt solve it, i'd bet your provisonal profile isnt for distribution and you're trying to package it for ad-hoc. maybe try a different profile or change the packaging to ipa-debug-interpreter.
also, does it ask for the password? maybe add -storepass *yourpass* and iphone sdk too -platformsdk /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文