The “In the box” project aims at porting the Dalvik VM and the Gingerbread API on top of iOS, so that Android applications may be easily turned into iOS ones. Unlike the Alien Dalvik project, it is community-driven, and the source released under version 2.0 of the Apache Software License. Recently, this project has published its first result: a “Hello World” Android application running on top of iOS.
No big deal, here’s my Hello World iOS App that runs on Android:
<html>
<body>
Hello World
</body>
</html>
Good look using GPS, the digital compass and all the other cool hardware features on modern smartphones with HTML.
No problemo
http://docs.phonegap.com/
I stand corrected.
thank you for that excellent link
Edited 2011-06-02 15:28 UTC
There’s an app for that 🙂
http://www.phonegap.com
GPS, Compass, Accelerometer, File system access, taking photos, sqlite relational client side database, all available using javascript.
Correct me if I am wrong, but doesn’t Apple frown on using foreign APIs on iOS and ban them from the App Store? So won’t these apps be Cydia-only?
I think they have changed their mind about this lately, in order to allow things like Unity3D or single-game emulators to exist. The thing they remain adamant about is interpretors which can be fed third-party code to extend their functionality.
Have they actually changed their rules, or are they just turning a blind eye?
If memory serves me, they officially banned any code compilers/interpretors other than their own because they wanted to explicitly stop cross platform development.
I remember them doing so, too, but I think they also have changed the terms later to something that allowed third-party frameworks.
Ah, if only Apple weren’t Apple and freely disclosed their licensing terms so that everyone can check them instead of putting them under NDA…
No, they changed the rule after the protests.
http://www.apple.com/pr/library/2010/09/09statement.html
The policy forbidding apps developed with non-Apple tools doesn’t seem to apply anymore. Otherwise, games made with Unity3D (which uses Mono) or the Unreal engine (which uses UnrealScript) wouldn’t be allowed. Neither would MonoTouch, any games that use Lua, ports of old games based on emulators…
There is a technical problem though. iOS uses non-executable pages for all memory allocated by apps. This seems to be mostly a security measure. There is no way to opt out, turn it off, or mark memory as executable. The Xbox 360 does the same thing.
That means that you can not have a JIT in an iOS application (or on an Xbox 360 for that matter). At all. Unless you happen to be Safari (which is allowed to allocate executable pages for the JavaScript engine in iOS 4.3) or jailbreak the thing (which might remove the restriction – haven’t checked).
So even if this works, you’d either have to do ahead-of-time compilation into native code, or you’ll be stuck with a slow interpreter just like the early versions of Dalvik.
Doesn’t Apple ban emulation and scripting / interpreting?
I would imagine the use of a VM inside your application would get get your application rejected.
Basically this is just a port of the Dalvik VM to iOS. The demo shows Hello.java printing ‘Hello, World’ to the debug console. Not to downplay their achievement, but there’s no indication that they’ve done anything to port the Android UI toolkit. That might take a bit more work.