Skip to main content

Mapping Objective-C API to Java

  • Conference paper
Book cover Mobile Computing, Applications, and Services (MobiCASE 2012)

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. SWIG - Simplified Wrapper and Interface Generator, http://www.swig.org

  2. Adobe Systems. PhoneGap, http://wiki.phonegap.com

  3. 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)

    Google Scholar 

  4. Fowler, M.: Domain-Specific Languages. Addison-Wesley Professional (October 2010)

    Google Scholar 

  5. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley Professional (October 1994)

    Google Scholar 

  6. 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)

    Chapter  Google Scholar 

  7. Kochan, S.: Programming in Objective-C, 4th edn. Addison-Wesley Professional (December 2011)

    Google Scholar 

  8. Krasner, G., Pope, S.: A Description of the Model-View-Controller User Interface Paradigm in the Smalltalk-80 System (1988)

    Google Scholar 

  9. Lindholm, T., Yellin, F.: The Java Virtual Machine Specification, 2nd edn. Addison-Wesley Pub. Co. (April 1999)

    Google Scholar 

  10. Lougher, R.: JamVM, http://jamvm.sourceforge.net/

  11. Object Management Group. Common Object Request Broker Architecture, CORBA/IIOP (2004), http://www.omg.org/technology/documents

  12. 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)

    Chapter  Google Scholar 

  13. 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)

    Chapter  Google Scholar 

  14. Xamarin. MonoTouch, http://docs.xamarin.com/ios

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics