Adobe AIR 和 iPhone - 它是如何工作的? [英] Adobe AIR and iPhone - how it works?

查看:26
本文介绍了Adobe AIR 和 iPhone - 它是如何工作的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道 Adob​​e AIR 应用程序是如何转换为 iPhone 应用程序的吗?我看到了两种方法 - 要么 Adob​​e AIR 虚拟机必须成为每个应用程序的一部分,要么他们必须以某种方式将所有 ActionScript 调用转换为 Cocoa Touch 调用,或者为每个 ActionScript 类提供一个 Objective-C 孪生,然后将其编译为 ARM 汇编程序.

我只是好奇它在技术上是如何完成的.

BR斯坦

解决方案

与其他平台不同,当您构建 iOS 应用程序时,Adobe Air 会被编译为本机代码.

以下是 Adob​​e 博文的一部分:

<块引用>

我们创建了一个新的编译器前端,允许 LLVM 理解 ActionScript 3,并使用其现有的 ARM 后端输出原生 ARM 汇编代码.我们将此称为提前 (AOT) 编译 — 与 Adob​​e Flash Player 和 Adob​​e AIR 使用即时 (JIT) 编译在桌面上运行的方式形成对比.由于我们能够提前将 ActionScript 编译为 ARM,因此应用程序可以获得 JIT 提供的所有性能优势以及最终应用程序中不需要运行时的许可合规性.

这意味着:

  1. Air 运行时未打包在应用程序中.

  2. AS3 代码不会转换为 Objective-C 代码,而是直接编译为本地汇编代码.

Anyone knows how the Adobe AIR application are converted to iPhone apps? I see two ways - either the Adobe AIR virtual machine mus be part of every application or they must convert all ActionScript calls to Cocoa Touch calls somehow or have an Objective-C twin for every ActionScript class and then compile it to ARM assembler.

I am just curious how it is technically done.

BR STeN

解决方案

Unlike other platforms, Adobe Air is compiled into native code when you build an iOS application.

Here is a part of a blog post from Adobe:

We created a new compiler front end that allowed LLVM to understand ActionScript 3 and used its existing ARM back end to output native ARM assembly code. We call this Ahead of Time (AOT) compilation—in contrast to the way Adobe Flash Player and Adobe AIR function on the desktop using Just in Time (JIT) compilation. Since we are able to compile ActionScript to ARM ahead of time, the application gets all the performance benefits that the JIT would offer and the license compliance of not requiring a runtime in the final application.

That means that:

  1. The Air runtime is not packaged within the application.

  2. AS3 code is not converted into Objective-C code, but is compiled directly into native assembly code.

这篇关于Adobe AIR 和 iPhone - 它是如何工作的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆