We are proud to announce the second release of the iPhoneJava project. This release contains a reworked event system which resembles the GWT event system and is much easier to use. Totalling nearly 500 classes, it provides almost complete set of Java wrappers for the Titanium APIs. It is also updated to the latest code from Titanium, and shall support most of the new APIs in Titanium Mobile 1.8.0 which should come out recently.
Getting the new release
The new release is now available from maven central. You can include it in your project's maven build by adding the following dependency to your project's pom.xml file:
<dependency> <groupId>org.urish.gwt-titanium</groupId> <artifactId>gwt-titanium</artifactId> <version>0.2.0</version> </dependency>
Or you can download the JAR file directly from the repository:
iPhone Java is a new initiative enabling developers to create iPhone applications using the Java programming language. The project takes advantage of existing technologies (namely Google Web Toolkit and Appcelerator's Titanium) in order to enable the creation of native-looking iPhone applications written entirely in Java.
There is no official release yet, but a significant amount of code has already been comitted to our github repository. There is currently very little documentation, one working 'hello-world' example, initial (non-working) code base for a Kitchen Sink example, and comprehensive javadocs for the API bindings based on Titanium SDK documentation. The code for the project is released under the Apache License, Version 2.0.
'Hello World' Example
The hello world example provides a quick proof of concept and serves as a starting point for new projects. An upcoming blog post will cover the 'Hello World' example in detail, including some screenshots.
Obtaining & Building
Get a fresh copy of the latest source code from github. If you are not familiar with github, you can download a zipped copy by clicking the "Downloads" button on the top-right side of the github page, then you will get a dialog window offering you to download the source code directly.
Next, place the files "gwt-user.jar" and "gwt-dev.jar" from GWT 2.2 distribution under the 'lib' directory. Newer version of GWT will also work. The latest GWT sdk (at the time of writing) can be downloaded here: http://google-web-toolkit.googlecode.com/files/gwt-2.3.0.zip.
Finally, run the "build.xml" file using the ANT build system. This will create a file named "gwt-titanium.jar" under the 'build' directory, which is the GWT module you use for creating iOS applications in Java.
Building 'Hello World'
Running 'Hello World'
You will need a Mac device for running the 'Hello World' example on your iOS device. If you only have a windows machine, you can still use the framework and utilize the Titanium support for android in order to run the example inside the Android emulator or on a real Android-based device. You will also need the Appcelerator Titanium SDK installed (free, under the Apache 2 License).
Create a new mobile project inside the Titanium Studio IDE. After you have created the project, simply copy and paste all the content from the HelloWorld.js you built in the previous step to 'Resources/app.js' in the newly created project. Run the new application from within the Titanium Studio and you are ready to go!
If you need assistance in installing the Titanium SDK and creating a project, check out Appcelerator's Help Center.
The iPhone Java project is lead by Uri Shaked.
I would also like to credit the gwt-node project, which provided a great start for creating the custom GWT linker.
The gwt-titanium project is just in the beginning. I would love to hear your thoughts and ideas and see how far we can go with this project.