Google releases tool to bridge back-ends for iOS and Android apps

Google releases tool to bridge back-ends for iOS and Android apps

Summary: The J2ObjC tool converts Android-friendly Java source code to Objective C, which is used to build iPhone and iPad apps. It can't be used as a shortcut to building iOS app user interfaces, though.

SHARE:
TOPICS: iOS, Android, Smartphones
2

Google has released J2ObjC, a tool to make it easier for developers to write a common back-end for an app that can then be deployed across iOS, Android and the web.

The open-source tool, which automatically converts Java source code into the Objective-C language that is used in native iPhone and iPad apps, was announced in a blog post on Friday. The J2ObjC project page explains that it is "currently between alpha and beta quality", and versioned at 0.5 to reflect its readiness.

The command-line tool does not tackle the user interface for apps — in the case of iOS apps, the UI still needs to be written using Objective-C or Objective-C++.

"J2ObjC enables Java code to be part of an iOS application's build, as no editing of the generated files is necessary," Google engineer Tom Ball said in the blog post. "The goal is to write an application's non-UI code (such as data access, or application logic) in Java, which can then be shared by Android apps, web apps (using GWT), and iOS."

Ball explained that J2ObjC supported Java 6 and "most of its runtime features that are required by client-side application developers, including exceptions, inner and anonymous classes, generic types, threads and reflection", as well as JUnit test translation and execution.

The project page noted that some Google projects already relied on J2ObjC, but it was still buggy — partly because "every Java developer has a slightly different way of using Java".

Developers wanting to use the tool will need a Mac OS X system with Xcode 4 or higher, Java for OS X and Apache Maven.

Topics: iOS, Android, Smartphones

David Meyer

About David Meyer

David Meyer is a freelance technology journalist. He fell into journalism when he realised his musical career wouldn't pay the bills. David's main focus is on communications, as well as internet technologies, regulation and mobile devices.

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Talkback

2 comments
Log in or register to join the discussion
  • The Amusing Thing Is ...

    ... this tool translates FROM Java to Objective-C, not the other way round.

    By the way, I thought Apple had something in the terrms and conditions for its IOS SDK that you were not allowed to use tools that automatically generated Objective-C code?
    ldo17
    • That's because Android can accept objective C

      Android can accept objective C stuff through the NDK, so it's not really necessary.
      trainman261-2