Cross-compiling Android applications to the iPhone

  • Authors:
  • Arno Puder

  • Affiliations:
  • San Francisco State University, San Francisco, CA

  • Venue:
  • Proceedings of the 8th International Conference on the Principles and Practice of Programming in Java
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Smartphones such as Android-based devices and Apple's iPhone have become popular platforms for mobile applications. In particular, they allow the development of native applications that can take advantage of special purpose hardware such as accelerometers or GPS. While similar in capabilities, smartphones differ greatly in the way native applications have to be written for them. Google's Android is based on Java with an Android-specific set of widgets, while Objective-C is Apple's first choice for developing iPhone applications. In fact, Apple explicitly prohibits Java virtual machines on the iPhone per license agreement. Objective-C and Java are two radically different programming languages. While Java features strong typing and garbage collection, Objective-C supports dynamic typing but no garbage collection. This paper describes a technique how Java-based Android applications can be cross-compiled to native iPhone applications. Furthermore, it is shown how the Android API can be mapped to the iPhone-specific Cocoa Touch API.