To facilitate the migration of applications for Android to iOS, Google has decided to offer in open source its Java to Objective-C code converter.
Google offers J2ObjC under an open source license(Apache License 2.0). It is a Java to Objective-C and C++ code converter. Google’s goal: to facilitate the porting of applications, initially developed for Android, to iOS. The idea is to respond indirectly to the problem of cross-platform mobile development.
Based on the iOS Foundation Framework, J2ObjC generates code compatible with Xcode development tools. The output code can then be integrated and tested in Apple’s Xcode suite. J2ObjC does not generate the user interface of the application for iOS. Google considers that “the only way to get an efficient and fast iOS UI is to write it in Objective-C using the iOS SDK “.
To translate the source code, J2ObjC implements a series of processes: eliminating unnecessary code, rewriting Java code that has no equivalent in Objective-C (such as static variables), converting class methods… J2ObjC remains for the moment in alpha version.