Filed under: iPhone
In which, iPhone apps are built
It turns out that creating new GUI iPhone apps is both harder and easier than you expect. Saturday night when the first iPhone UI app proof-of-concept appeared, I was tied up with family. I frantically emailed Mike Rose begging him to get a post out, which, wonderful man that he is, he did. Sunday, I grabbed what time I could, intent on testing out the new developer toolchain produced by Nightwatch and company. In summary: if you can wait for an already-compiled binary toolchain to emerge, do so.
The developers have done all they can to make building the tools as simple a process as possible. The folks on the irc.osx86.hu #iphone-uikit channel are helpful and supportive. But the bottom line is pre-alpha means pre-alpha. There many rough compiling patches along the way where I ended up hitting my head against the wall, convinced I could never get the tools built. I had to edit the source several times to get it to compile on my Intel Mac Mini.
That doesn't take into account the configuration issues involved getting the HelloWorld binary to build after you finish installing the tools. There's a file you have to adjust, the arm-cc-specs, that's really really fussy until it finally works. Which it did, late yesterday.
From there, it's a rough but glorious ride into the wild world that is UIKit. The ease of travel from building HelloWorld into creating your own apps involves your Cocoa-Fu, or depth of experience building applications under Apple's standard AppKit. You see, UIKit is similar to Cocoa but different enough to cause headaches. Many things you expect to work the same do not--although many, happily, do. And it feels as if you're programming with gloves on. You never know when a class you need won't be there or one you think you know has morphed into a stranger.
Leaving all that aside, I did manage to build several applications. My favorite is the one shown here. It allows you to run any arbitrary script you put into its application folder and name as doit.sh. (It defaults to running "ps -ax".) You must have installed /bin/sh on your iPhone and be able to add files to your Applications folder to get this running, which pretty much limits its audience to people who have enabled ssh on their iPhone. Also, the interface is (as you can see) primitive. It still lacks scrolling, zooming and a fixed-width font.
In conclusion, building your own toolchain probably isn't really worth all the fuss and bother. The trouble to get the toolchain compiled is probably the biggest obstacle before we start seeing a lot of great tools show up. As soon as a binary toolchain is released more developers will start building applications. The programming environment, while a bit twisted, is close enough to standard Cocoa that people are going to get up to speed and start publishing apps pretty quickly. I expect to see a third-party iPhone Apps installer show up very soon. Although you can install apps yourself using jailbreak (to open up the file system) and iphoneinterface (to transfer the files), this remains for the moment firmly planted in the more hard-core corners of the hacker realm.


Get a WordPress.com Blog
![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 1)
Brenda Campbell said 12:17PM on 7-30-2007
I believe this was the first app.
http://web.mac.com/abigproduction/iWeb/thebirdandsquirrel/JustforYou.html
Reply
Jack said 12:35PM on 7-30-2007
@ Brenda
If that 'app' was real, then yes it would be the first, but sorry, its a fake...
Great Job Mike Rose!
-Jack
Reply
Sahil said 2:31PM on 7-30-2007
I was kinda convinced until the guinness started filling up the entire iphone face (including the blacked out bottom and top portions, where the home and ear piece are located)... if only
Reply
mingistech said 2:19PM on 7-30-2007
Digg it!
http://digg.com/apple/In_which_iPhone_apps_are_built
Reply
babacrash said 7:07PM on 7-30-2007
Reminds me developping an application for Pocket Pc... the .Net Compact Framework has a lot of functions, properties, components... but always lacks the one you need compared to the Standard Framework.
Reply
Macskeeball said 1:50AM on 7-31-2007
What's up with that title?
Reply
Erica Sadun said 1:53AM on 7-31-2007
It's an old fashioned way of introducing chapters. "Chapter 1...IN WHICH WE ARE INTRODUCED TO WINNIE-THE-POOH AND SOME BEES, AND THE STORIES BEGIN"
Reply
DWBjr said 5:02AM on 7-31-2007
@tommy
Oh... is that your signature?
Looks like spam.
Reply
DWBjr said 7:15AM on 7-31-2007
@Erica
Well, I "got" it.
Reply
Big Brother said 3:56PM on 7-31-2007
SDK is on its way!
http://iphone.corank.com
Reply