Talk Funnel

Ramin Firoozye's (occasional) Public Whisperings

Notes from the iPhone Tech Talk

Posted by: Ramin on October 23, 2008

I spent all yesterday at Apple’s first iPhone Tech Talk in San Francisco (technically, Paris was first because of time differences, but we won’t quibble). After seeing the schedule of events (and having attended WWDC) my expectations for getting new technical information were pretty low.

Boy, was I wrong.

The talk itself was under NDA so I won’t go into details. But I’ll point at a couple of items in current examples and documentation that everyone should be aware of:

  • If your app is using audio in any way, you’ll want to make sure you’ve read and understood the “Audio Sessions: Cooperating with Core Audio” section of the “Core Audio Overview” document (it’s part of your help document set in the SDK).

    Of special importance is making sure you declare the proper AudioSessionCategory for your app. Not doing it means that if your app uses sound (input or output) and gets interrupted — by an incoming phone call, or even by the user plugging and unplugging headphones — your app’s sound may not continue playing properly. There’s some example code in the SpeakHere example to help point the way.

    Here, by the way is what the documentation says:

    Ignoring Audio Session Services will not prevent your application from running, but your app may not behave the way you want it to. Never ship an iPhone or iPod touch application that uses audio without using this interface.

    You’ve been warned.

  • If you’re using the accelerometer, you’ve probably seen the low-pass filter code in the docs and examples. The point of the filter is to smooth the effect of motion ‘jitter.’

    The thing is, the basic low-pass filter formula is — to put it mildly — non-functional (aka brain-dead). Again, I can’t talk about the specifics, but the presenter had graphs that showed how bad that formula behaves.

    Actual color graphs, I tell you!!!

    If you manage to get your hands on a sample iPhone Apple application called Touch Fighter — you’ll want to use the smoothing function there (the app was handed out in WWDC and isn’t part of the standard SDK example set).

    If you can’t find it, I suggest looking around for source code that handles the Wii remote (they have to deal with similar issues). At some point, I might post a more detailed technical article on this.

  • Gesture management is still something that Apple leaves to individual developers, instead of including it in the SDK. I have a ‘swipe’ detection library (but it’s only for one-finger swipes, not multi-touch). If there’s demand for it, I’ll post it up.

    But really, this should be something supported in the OS.

Most of the TechTalks are full now. If you happen to have gotten accepted, don’t skip them. If not, get on the waiting list. It’s worth it. The sessions on game development and performance tuning are massive info-dumps. Might want to take a lot of notes.

P.S. That mod-squad picture on the web site (excerpted above) features actual Apple evangelism group members strutting their stuff 🙂