Sunday, May 24, 2009

First iPhone App

I finished the first pass at a working iPhone app. It's a port of the SpiderMonkey Javascript engine from Mozilla. I've put together a simple UI with an editor and output text areas. Currently it only has an alert() function and a print() function for displaying results in the output text view. It does have all of the default functions and objects for JavaScript 1.7.




Source available here. I am looking to host the project somewhere, but I haven't decided on a Mercurial hosting solution that's free and allows me to upload an existing repository.

Now, I can't actually submit this to the App Store (it uses a separate language interpreter). I did it as an exercise in porting an existing application as a first step for porting another application which uses SpiderMonkey as its scripting engine. That one has a lot more graphical and file issues, so it'll be a bit more of a challenge.

3 comments:

El Chapitan said...

I've actually had a bit of a quandry about mercurial vs. git lately. I'm using mercurial on a flash project with someone else, and while it seems to be the same as git (albiet a bit slower), for most stuff it seems to work just fine. However, since we're flash project we have compiled resources/assets which are stored in binary format. These do not play well with mercurial for some reason. We're still not sure if we did something wrong or not (and I'm especially in the dark since this was work being done separate from my own). Anyway, the jury is out in my brain on the Hg vs. Git breakdown.

El Chapitan said...

btw, app looks awesome!

Peter Schwarz said...

I've been using Hg a bit lately for personal projects (in other words, small ones). I've been enjoying the simplicity of the commands, ease of use and simple plug-in architecture. I'm not sure where it sits in popularity, though.

As for the app, I hadn't tested it on a device until last night. While it works for the most part, the Math functions aren't quite working (well, at least I know that Math.PI is not 80e52). I might have to compile in the Math lib from the original source...