rentzsch.com: tales from the red shed

Double-Broom: LIVE IT

Notes

Wincent’s post reminds me of an Xcode tip worth mentioning. Xcode’s “Clean All” command (with the double-broom icon) is your best friend. When something doesn’t make sense (“why isn’t this code I fixed working?”), double-broom. It’s cheap. Somewhat voodoo, but it works for me on average maybe twice a week.

Ignore the single-broom. I trust it like I trust Steven Frank with my MasterCard in Office Depot. If I were king of Xcode for one day, I’d delete that command. It adds a shade of gray to your solution binary search.

Bouncing Xcode is also your friend. Especially when Xcode can’t find a header it’s supposed to (or used to), just quit and relaunch Xcode. Sometimes I get lucky and get away with just closing and reopening the project file, but quitting is preferable. I’ve tediously added oodles of explicit search paths to a recalcitrant project, only to find out later I just needed to bounce Xcode to have it work again.

In the PBX (Project Builder days) even the double-broom was untrustworthy — your best bet was to manually nuke the entire build folder. Given PBX is long dead, that tidbit may read like Tales from the Crypt but it pays to know your history. Specifically, Xcode’s current Java infrastructure is warmed-over from PBX, and it suffers the same flaw. More often than not, I’ll wedge an Xcode Java project into compiler errors that only will go away by nuking the build folder. Even with ObjC Xcode projects, if you have “nonnative” targets, I wouldn’t be surprised if you see the same issue. Upgrade those puppies. (Sadly, you can’t upgrade a Java target.)

While I’m handing out Xcode advice, be a dear and customize its toolbar to put the “active build configuration” popup right next to the active target popup. It’s fairly important to know which configuration you’re working with, since their behavior (at compile, link and run-time) can differ dramatically.

Thank you for your years of tireless service, double-broom. I’ve clicked you only slightly less than the build button itself.

Tuesday, April 04, 2006
03:52 PM