What is the A2O Converter and How Does it Work?

“Apples to Oranges” (A2O) is a source-to-source compiler that builds web applications from iOS application source code.

It was created to help app developers ship web versions of their applications while letting them continue focusing their energy on native apps.


Our team’s goal is to make web apps first class citizens again.

Many native apps now ship with embedded web browsers, which has made single click application launch even more compelling. With the increasing prominence of messenger apps and their embedded web apps, we believe that web apps are in a better position than ever before to compete with native mobile apps.

But the web as a mobile platform still faces a two-sided market problem. Users stay on platforms that offer a rich selection of applications. Developers must prioritize the platforms with the most users. In the age of App Stores, the web has been relegated to a second class citizen for app discovery and usage, and it has been difficult to justify developing for it.

To solve this chicken and egg problem, we built A2O.

How Does it Work?

This 4m40s screencast shows you the entire A2O conversion process from start to finish. The process is automated.

We’ve been working with game companies to convert their iOS games to Web games. You can try some of them out on our demo site.

(Feedback Welcome!)

What’s Inside A2O?

A2O is based on Emscripten, Mozilla’s open source LLVM-to-JavaScript compiler. Emscripten lets you run C/C++ applications in web browsers.

A2O consists of:

  1. Emscripten extended to support Objective-C and iOS frameworks.
  2. A builder which reads the Xcode project file and generates the HTML/JS code and data files.

We referenced objc4, libdispatch, and libclosure in modifying Emscripten to support Objective-C.

An iOS application uses many iOS frameworks (ex: Foundation, UIKit, etc.), which must be reimplemented for the Web. We’ve implemented a subset of them so far, leveraging the work of the Chameleon, Cocotron, and Apportable projects.

Work in Progress

A2O is still in its nascency. Some areas we’ll be working on include:

  • Unimplemented APIs, including StoreKit(for payments), UserNotifications(for push notifications), etc.
  • The converter output is huge and consumes a lot of CPU and memory. This prevents some applications from running well on smartphones. WebAssembly should help improve resource consumption.
  • Swift support.
  • A2O currently requires source code to convert an application, but some libraries (ex: ad libraries) are in binary. As of now, we use mock libraries to circumvent this. We are looking at supporting conversion from .ipa files in the future.


We’re building technology to help the mobile web be a vibrant place for web applications.

If you know developers who are keen on having a web presence but haven’t had the resources to devote to such an effort, we’d love to get in touch and work together.