Sunday, October 05, 2008

iPhone dev 17

Oh lord, I just discovered that curly braces require one extra keystroke on the Finnish keyboard layout on the mac. Somehow the keyboard layout isn't the familiar one from Windows. I would use the USA layout, but then writing scandinavian characters would be a pain. I have to press alt - shift - 8 to get a curly brace!

Spent hours today trying to find out why a sample application won't run on the iPhone. Turned out in my Info.plist file the bundle identifier was the same as with another app, so it wouldn't install another one with the same id.

Next I challenged myself to create a small app which would have three textfields that display the raw data coming from the accelerometers. I got stuck early -- I wanted to use a timer to fire an event at certain intervals. Spent a very long time trying to find info in the docs. Looked at some sample applications, but they were more hardcore and had actual threads to do the timing. Then finally NSTimer was mentioned in a forum post.

timo = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(onTimer) userInfo:nil repeats:YES];

- (void)onTimer {
int test;
test = 10;
}

Disappointed a bit that I couldn't finish this dead simple app in one evening. I'm starting to get a feeling where iPhone development falls on the difficulty scale. Maybe 5 times easier than Symbian development, but still 2-3 times more time consuming than Flash development.

Hello World in Flash from nothing: 5 minutes
Hello World on the iPhone simulator: 2 hours
Hello World on the iPhone: 6 hours (mostly figuring out app signing, device id blah blah issues)
Hello World in Symbian: coder pronounced dead at the hospital due to massive internal bleeding