Mar 19
Developing iPhone Applications without using Objective C
When the iPhone SDK came out in March 2008, mobile developers were very excited to be able to develop native applications for the increasingly popular device. However, that excitement was partially tempered by some requirements of the platform, which for most meant learning how to program Objective C, a language that only Mac developers are familiar with. Just as with iPod users, iPhone application developers do come from all walks of life–they’re not all Mac die-hards.
XMLVM
I watched the Google Tech Talk about XMLVM, which goes into significant depth about the conversion process. Essentially, the technology does cross-compilation from the compiled version of your Java application, in other words JVM bytecode instead of Java source code. Thus, the entire process of compiling an iPhone application would consist of Java source -> JVM bytecode -> Objective C source -> native iPhone binary. The speaker goes into detail with an example showing the conversion of JVM bytecode into Objective C source, which is easy to understand and can be educational. Other languages for the XMLVM
Java is not the only source language that can benefit from XMLVM. There is support for other input languages and output code. See the website for more information.Enhancing the iPhone emulator with hardware data
One nice tool that the XMLVM team developed was a way to send device data to the desktop emulator, which naturally cannot emulate everything that the iPhone can do. For example, you can use a real iPod Touch or iPhone to send accelerometer to the emulator. The same could be envisioned for other functionality, e.g. GPS, light sensor, proximity sensor, etc. I imagine this is so helpful for the development process that others must have implemented something like that as well.Better to Develop in Objective-C
My opinion regarding these kinds of language-adapting frameworks or tools that allow developers to code in their familiar language is not very positive. In general, I don’t think it’s a good idea to distance yourself from the target platform. Problems include:- Limited functionality
- Lower performance
- More complicated development process
- More source of bugs in your way (from not just the iPhone OS and SDK, but from the language adapter)
- Smaller community of developers, fewer development tools, less documentation
Time to market is everything, if you have a data driven application that just needs a user interface then XMLVM is great at getting your application on several mobile platforms at the same time.
I agree that it wouldn’t be the best tool to develop a high performance game.
So ehh, what “cool” features has the iphone sdk added recently…or…ever?
Flamebait: Also, Objective-C is a horrible language.