If you are a Java developer and interested in mobile applications, chances are you are already familiar with Android development. Therefore this article will not focus on Android development using Java. Apple mobile OS is widely available but the recommended development language is SWIFT/ Objective-C. The reason you are reading this article is because you want to know how to leverage your skills and knowledge and still take advantage of the Apple iOS ecosystem. So the motivation is clear; write your code once in Java and re-use them on all devices. This would greatly simplify testing and maintenance..
If you are embarking on a new project, here is 3 of our favourites tool to develop iOS application using Java:
JavaFX was introduced as the saviour of Java on Mobile devices. And then Sun/Oracle got confused, they wanted JavaFX to also run in browsers, desktops, embedded devices and mobile applications regardless of the vendor. Least but not last, JavaFX is set to replace Java Swing for Java desktop applications. Anyway enough of the history and let’s see why you would probably consider writing your code using JavaFX. As a Java developer, the learning curve for moving to JavaFX is minimal. You will still write Java code and you will have access to the full Java library (Java8 and soon 9). JavaFX used to have a standalone GUI builder tool called the SceneBuilder. SceneBuilder has been discontinued by Oracle but fear not, Gluon has the taken the baton. Gluon also develops the JavaFXPorts which provides porting capabilities to Android and iOS. Developers can use their favourite IDE and Maven to develop applications which targets the various supported OSes. A major advantage of using JavaFX and JavaFXPorts is the access to the Java SE API. JavaFX is free to use. What are the plans for JavaFXPorts as the compilation to iOS was using RoboVM which is now defunct?
CodeNameOne is Java tool, similar to the previous tool, allows Java developer to take advantage of their skills to develop iOS application. We, Kiktronik, have this tool in the past to develop cross platform apps for our clients. There is a drag and drop interface to help with productivity. Developers can use their favourite IDE to integrate with the CodenameOne plugins. Developers working from a Windows machine can make use of their cloud servers to build iOS application. CodenameOne is free to use even for your commercial applications. One caveat is that developers will not have access to the full Java 8 API but a subset using the CLDC 1.1 which is a subset of Java API for smaller devices. CLDC were implemented in the old J2ME devices. Also their implementation of Java 8 is not suspect; it looks like they wrote their own version of some of the APIs such the Lambda operations. Nevertheless, the tool provide a simple to use IDE plugin to help develop your next iOS application using Java.
Many of you have probably never heard of Intel Multi-OS Engine. The Multi-OS Engine is Intel’s way to help Java developers to write cross platform application. The tool can be used through Gradle and Android Studio (and other IDE too). When using the tool via Android Studio, developers have the full power and flexibility of the IDE; drag and drop, live previews with the addition of running your application on a simulated iOS device. Let’s not forget that Android Studio is built on IntelliJ so all the features are available to the developer. The final iOS application’s performance would be on par to the SWIFT/ Objective-C apps. Also, if you are already familiar with Android development, you feel right at home. Intel Multi-OS Engine is open source and free to use, so give it a try.
The information above should help create a list of tools to use based on your requirements. If you were not sure if you could leverage your Java skills to develop for the iOS ecosystem, there you have it.
If we missed out on any other tools, let us know.