HTML5 ARTICLE

February 11, 2013

Intel’s New Tool Helps You Translate Apple iOS Apps to HTML5


Developers want their application to be used in as many platforms as possible without having to write the code for each platform. Rewriting code is a time-consuming process many would love to avoid, but it is a necessary evil if you want to capture the market share of other platforms.

When it comes to Apple (News Alert) iOS devices for iPhone and iPad, most developers use Object-C, but the code used to write these apps is for these devices. Other devices cannot use these apps directly, eliminating a large portion of the market.

The Intel (News Alert) HTML5 App Porter Tool, currently in beta, will make many developers incredibly happy if it delivers on its promise.

HTML5 is increasingly being used by developers because different OS and devices support the format. This eliminates the need to rewrite the code of an app because it allows the same code base and can be used in numerous different app releases.

So how does Intel manage to take the Objective-C code and turn into HTML5? First of all, it’s not a complete conversion, but it goes as far as possible. It might seem like a letdown, but a developer will take any tool that will prevent him or her from rewriting any code, even if it’s a single line.

According to Intel, “The Intel HTML5 App Porter Tool – BETA is an application that helps mobile application developers to port native iOS code into HTML5, by automatically translating portions of the original code into HTML5. This tool is not a complete solution to automatically port 100 percent of iOS applications, but instead it speeds up the porting process by translating as much code and artifacts as possible.”

The tool does the following:

  • It translates Objective-C source code into Javascript
  • iOS API types and calls are translated into Javascript/HTML5 objects and calls. Not all APIs are supported, but the Porter Tool concentrates on the small number of iOS APIs that are heavily used in most applications. The most used types and methods in the UIKit framework and Foundation framework are supported, together with a few classes of other frameworks
  • Layouts of views inside Xcode Interface Builder (XIB) are converted into HTML pages with associated CSS
  •  Xcode project files are converted into Microsoft (News Alert) Visual Studio 2012 projects

If the App Porter Tool is not able to convert within an iOS API, it creates a placeholder code and annotates it. The converted code has function and variable names that are preserved in the original code, making it easy to navigate. The file names are saved or preserved as far as possible; again this makes it easier to recognize original code, though file extensions will probably change.

As the program is still in beta, Intel plans to have more support for more iOS APIs in the future. The technical reference guide at the company’s site has more information. Developers can download the tool and have a go at it, and leave any feedback.




Edited by Braden Becker





HTML5 RESOURCES

HTML 5 Demos and Examples

HTML 5 experimentation and demos I've hacked together. Click on the browser support icon or the technology tag to filter the demos.... Learn More

HTML5 GAMES

HTML5games.com is the largest and most comprehensive directory of HTML5 games on the internet... Learn More

The HTML5 test

How well does your browser support HTML5?... Learn More

Working Draft (WHATWG)

This is the Editor’s Draft from WHATWG. You can use it online or print the available PDF version... Learn More

HTML5 Flip Book

Free jQuery and HTML5 flip book maker for PDF to online page turning book conversion... Learn More