Mobile Computing, Applications, and Services. 4th International Conference, MobiCASE 2012, Seattle, WA, USA, October 11-12, 2012. Revised Selected Papers

Research Article

Mapping Objective-C API to Java

Download
547 downloads
  • @INPROCEEDINGS{10.1007/978-3-642-36632-1_2,
        author={Arno Puder and Spoorthi D’Silva},
        title={Mapping Objective-C API to Java},
        proceedings={Mobile Computing, Applications, and Services. 4th International Conference, MobiCASE 2012, Seattle, WA, USA, October 11-12, 2012. Revised Selected Papers},
        proceedings_a={MOBICASE},
        year={2013},
        month={2},
        keywords={API Mapping Objective-C Java iOS},
        doi={10.1007/978-3-642-36632-1_2}
    }
    
  • Arno Puder
    Spoorthi D’Silva
    Year: 2013
    Mapping Objective-C API to Java
    MOBICASE
    Springer
    DOI: 10.1007/978-3-642-36632-1_2
Arno Puder1,*, Spoorthi D’Silva1,*
  • 1: San Francisco State University
*Contact email: arno@sfsu.edu, spoorthi@sfsu.edu

Abstract

Apple champions the use of Objective-C for iOS development and has prohibited the use of virtual machines in the past. In previous work we have shown how Java can be used as an alternative programming language for iOS applications. We described a byte code-level cross-compiler that translates Java-based applications to portable C code to circumvent this legal restriction. A major challenge not addressed in our previous work pose the significantly growing size of the iOS API, since every Objective-C based API needs to be exposed in Java. So far we required the necessary Java skeletons to be written by hand. Since its introduction in 2007, the iOS API has nearly doubled in size. Considering the size of the iOS API this approach does not scale. In this paper we describe an API mapping tool that can generate the required Java skeletons by parsing Objective-C header files. Emphasis is placed on mapping Objective-C’s dynamically typed API to strongly typed API in Java.