Tuesday, September 30, 2008

iPhone dev 2

There seem to very cool tools for debugging and coding. The "Instruments" application seems impressive, creating data porn from your app as it runs. It isn't mentioned whether that can be used when developing for iPhone. I learned for iPhone there is a different compiler, on Mac gcc is used. The iPhone simulator needs to be compiled for, so it really is a simulator and not an emulator. The iPhone needs some special configuration to start development on it.

iPhone dev

I have never used a mac. Once I sat at one in a computer room because other computers were taken, but I couldn't figure out how to turn it on! So with this background let's see how far I can get with iPhone development. I started off by ordering a Mac Mini, buying a jailbroken iPhone from an auction and signing up for the developer program. While waiting for the hardware to arrive I can use the time productively by reading the documentation. Stuff I've learned in the first hour:

"Aqua" is probably what the UI is called on a Mac and "Quartz" is some kind of rendering system for it. You develop software with "Cocoa", which historially comes from NeXTSTEP. The docs talk about "Darwin", which according to Wikipedia is a flavor of UNIX (isn't that Mac OS X? I'm confused). "Carbon" is something I should ignore. Apparently Cocoa also comes with an IDE, which is perhaps called Xcode. When developing for the iPhone my app will take over the whole device -- only one program is running at a time + some background daemons. SQLite and OpenGL are used somewhere by something. On the Mac Cocoa consists of "foundation" and "application kit", but on the iPhone the app kit is called "UIKit". Foundation does non-gfx things. The language stuff is developed on is "Objective-C", which is some kind of superset of ANSI C but with additional OOP features inspired by Smalltalk. Some lower levels use just plain C, but in Cocoa there are OOP wrappers for them.

Let's see if I have the energy to continue, or if I decide to auction off my hardware when it comes :)