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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
SWIG - Simplified Wrapper and Interface Generator, http://www.swig.org
Adobe Systems. PhoneGap, http://wiki.phonegap.com
Beazley, D.: SWIG: An easy to use tool for integrating scripting languages with C and C++. In: Proceedings of the 4th Conference on USENIX Tcl/Tk Workshop, vol. 4, p. 15. USENIX Association, Berkeley (1996)
Fowler, M.: Domain-Specific Languages. Addison-Wesley Professional (October 2010)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley Professional (October 1994)
Hudak, P.: A semantic model of reference counting and its abstraction. In: Proceedings of the 1986 ACM Conference on LISP and Functional Programming, pp. 351–363. ACM, New York (1986)
Kochan, S.: Programming in Objective-C, 4th edn. Addison-Wesley Professional (December 2011)
Krasner, G., Pope, S.: A Description of the Model-View-Controller User Interface Paradigm in the Smalltalk-80 System (1988)
Lindholm, T., Yellin, F.: The Java Virtual Machine Specification, 2nd edn. Addison-Wesley Pub. Co. (April 1999)
Lougher, R.: JamVM, http://jamvm.sourceforge.net/
Object Management Group. Common Object Request Broker Architecture, CORBA/IIOP (2004), http://www.omg.org/technology/documents
Puder, A.: Running Android Applications without a Virtual Machine. In: Venkatasubramanian, N., Getov, V., Steglich, S. (eds.) Mobilware 2011. LNICST, vol. 93, pp. 121–134. Springer, Heidelberg (2012)
Smaragdakis, Y., Batory, D.: Implementing Layered Designs with Mixin Layers. In: Jul, E. (ed.) ECOOP 1998. LNCS, vol. 1445, pp. 550–570. Springer, Heidelberg (1998)
Xamarin. MonoTouch, http://docs.xamarin.com/ios
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 ICST Institute for Computer Science, Social Informatics and Telecommunications Engineering
About this paper
Cite this paper
Puder, A., D’Silva, S. (2013). Mapping Objective-C API to Java. In: Uhler, D., Mehta, K., Wong, J.L. (eds) Mobile Computing, Applications, and Services. MobiCASE 2012. Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering, vol 110. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-36632-1_2
Download citation
DOI: https://doi.org/10.1007/978-3-642-36632-1_2
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-36631-4
Online ISBN: 978-3-642-36632-1
eBook Packages: Computer ScienceComputer Science (R0)