Google tool ports Java code for Android to iOS for iPhone

Google opens the door for Android developers writing in Java to port apps to the iPhone with their open-source j2ObjC (Java to Objective-C) tool.

Developers make apps and apps sell phones, so this move by Google should endear them even more strongly to Android developers. Their new J2ObjC software tool “converts Java classes to Objective-C classes that directly use the iOS Foundation Framework." (Googles announcement). The Register reminds developers the tool is not a cross-platform miracle.

The open-source command-line tool from Google will help Android developers port their code to the iPhone, but won't do all the work. But it will keep more of their code in a single base that can be used for web-based apps, as well as Android and iOS. UI functions still need to be in Objective-C.

App happy

This will be a huge help in converting my Android app to iOS.

jarobusa on

There you go - cross platform iOS / Android / Mac / Linux / Windows development.

rburhum on

Actually common code on 4 platforms. We share Java code between the server, the web (via GWT), Android (already runs Java natively), and now iOS (via j2objc).

cromwellian on


Is my memory faulty or do I recall Apple closing off apps developed using cross-platform tools from the apps store a few years back? Must be some fingerprint in code generated this way that they'll spot and close off too.

Julian C on

unfortunately, the applications will be restricted from some APIs, mapkit, gamekit, anything that requires hardware accelerated graphics except webGL A for effort though

exspyguy on

Technically cute, but works only for non-UI modules, which comprise approximately 4% of a mobile app.

Evbn on

More options

That's one way of doing it. Another is to use Unity, which lets you code in C# or Javascript, and publish your code to Windows, OSX, Linux, Android, iOS, the Web and soon Windows Phone 8.

Anonymous Coward on

Yeah, I already write cross-platform code with C++ and it is really not as bad as anyone leads you to believe. Create one single C++ entry point object that drives everything else. Use sqlite for storage, jsonc for serializing/deserializing json, pthreads for threading and curl for making network requests.

rburhum on

I've been using Marmalade (previously known as AirPlay) for a few years to write games in C++ for iOS and Android (and Windows and OS X and Playbook and Bada and so on).

Mr Woof on

If you're a mobile app programmer, will this make your life easier?

For the latest IT news, analysis and how-tos, follow ITworld on Twitter, Facebook, and Google+.

Now read this:

Developer declares 'I am done with the Freemium Business Model'

Khan Academy offers JavaScript as their first computer language

Study says Facebook profile can predict job performance

ITWorld DealPost: The best in tech deals and discounts.
Shop Tech Products at Amazon