So in my absence I wrapped my first iPhone app. I sent off a build for review last Monday and I’m hoping to hear back from Apple sometime this or next week.

Today, I thought I’d share about a really neat debugging tool called Clang Static Analyzer. Basically, this tool runs through your code and points out potential bugs (memory leaks, logic errors, etc.). It’s powerful and easy to use, so I’d totally recommend adding it into your pipeline.

These were the steps that worked for me (repost from here):


  1. Download the latest build from:
  2. Extract and move the contents of the archive to a directory of your choice.
    (I use “/Developer/clang/”)
  3. Launch Terminal and input this command: sudo nano /etc/paths
  4. Add Clang as a system path by entering the directory location.
  5. Press ‘Ctrl-X’ to exit and then ‘Y’ to save.


  1. Launch Xcode, open your project, and run “Build > Clean All Targets.”
  2. Launch Terminal, navigate to your project directory, and input this command:
    scan-build -k -v -V xcodebuild -configuration Debug -sdk iphonesimulator###
    (Substituting “###” with your target OS. e.g. “2.2”)

Assuming everything works, Safari should then open a report highlighting the possible bugs in your project!

For a video demonstration, see Stanford’s CS193P Lecture 11 from May 6, 2009 (05:00-17:47).

And here’s a preview of my app: iFist


Joel Spolsky and co. (Stack Overflow) are hosting a new programming conference/tour (LA->London) this October to celebrate their website being totally awesome. They’re planning talks by some smart people on some new(ish) technologies and there’ll be free lunch ($100)! I’m a huge fan of these guys, so I’m confident that it’ll be a good time [at least in LA :].

Stack Overflow DevDays @ Joel on Software

P.S. Dan Grigsby is another smartie and recently posted this Best Of- feature:

Best of Stack Overflow For iPhone Devs @ Mobile Orchard

P.S.S. Don’t miss the “Xcode tips & tricks you wish you knew about!”

Part of becoming Xcode proficient is passing my mostly made up 90/10 keyboard-mouse litmus test. Which is to say, “Code with your keyboard and dropkick your mouse to the figurative curb.” Programming is already time consuming as is, so take the shortcuts where you can!

1. Block commenting (Command-/).


2. Show Completion List popup (Escape).


3. Show Symbols popup (Control-2).


4. Switch to Header/Source (Option-Command-Up).

5. Go to next/previous file in File History (Option-Command-Right/Left).

6. Build and Run (Command-Enter).

7. Go to next error/warning (Command-=).

If you’re curious, the full Xcode shortcuts are available for edit under Preferences (Command-,) > Key Bindings and also for download as a PDF at Cocoa Samurai.

Xcode Video Tutorial

May 7, 2009

I’m not terribly in the mood to write tonight, so I’ll keep it brief.

I found this video tutorial on Xcode after another week of hacking away at the MacBook. It’s a quick introduction to the IDE including some handy keyboard shortcuts:

Xcode Tips and Tricks