Abstract
Android is currently leading the smartphone segment in terms of market share since its introduction in 2007. Android applications are written in Java using an API designed for mobile apps. Other smartphone platforms, such as Apple’s iOS or Microsoft’s Windows Phone 7, differ greatly in their native application programming model. App developers who want to publish their applications for different platforms are required to re-implement the application using the respective native SDK. In this paper we describe a cross-compilation approach, whereby Android applications are cross-compiled to C for iOS and to C# for Windows Phone 7. We describe different aspects of our cross-compiler, from byte code level cross-compilation to API mapping. A prototype of our cross-compiler called XMLVM is available under an Open Source license.
Similar content being viewed by others
References
The Android Open Source Project: Bytecodes for the Dalvik VM. http://source.android.com/tech/dalvik/dalvik-bytecode.html
The Android Open Source Project: Dalvik eXchange (DX). http://android.git.kernel.org/platform/dalvik.git
Antebi O, Neubrand M, Puder A (2011) Cross-compiling android applications to Windows Phone 7. In: MobiCASE. Springer, Los Angeles
Davis B, Beatty A, Casey K, Gregg D, Waldron J (2003) The case for virtual register machines. In: IVME ’03: proceedings of the 2003 workshop on interpreters, virtual machines and emulators. ACM, New York, pp 41–49
Dixon R, McKee T, Vaughan M, Schweizer P (1989) A fast method dispatcher for compiled languages with multiple inheritance. SIGPLAN Not 24:211–214
ECMA (2006) C# language specification, 4th edn
JDOM (2004) Java DOM-API. http://www.jdom.org/
Kay M (2007) Saxon: the XSLT and XQuery processor. http://saxon.sourceforge.net/
Lindholm T, Yellin F (1999) The Java virtual machine specification, 2nd edn. Addison-Wesley, Reading
Puder A (2010) Cross-compiling Android applications to the iPhone. In: PPPJ, international proceedings series. ACM, Vienna
Shi Y, Casey K, Ertl MA, Gregg D (2008) Virtual machine showdown: stack versus registers. ACM Trans Archit Code Optim 4(4):1–36
Ungar D, Spitz A, Ausch A (2005) Constructing a metacircular virtual machine in an exploratory programming environment. In: Companion to the 20th annual ACM SIGPLAN conference on object-oriented programming, systems, languages, and applications, OOPSLA. ACM, New York, pp 11–20
W3C (1999) XSL transformations. http://www.w3.org/TR/xslt
Acknowledgement
This paper is an extended version of a conference publication [3]. The WP7 backend of XMLVM was supported by a grant from Microsoft Research. As with any Open Source project, XMLVM is the result of many volunteers. We are greatly indebted to their contributions.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Puder, A., Antebi, O. Cross-Compiling Android Applications to iOS and Windows Phone 7. Mobile Netw Appl 18, 3–21 (2013). https://doi.org/10.1007/s11036-012-0374-2
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11036-012-0374-2