Miscellaneous Leopard development gotchas
I've been using Xcode 3.0 under Leopard to do my development since Leopard came out last week, and thought I'd share a few changes that tripped me up.I have a build script that I use to assemble the disk image for a new release of iPhoto Library Manager or PlistEdit Pro. The script creates the disk image using the hdiutil command line tool. Everything went fine when building under Leopard except that, if you tried to mount the disk image on 10.3.9, it would refuse to mount. It turns out that Leopard's hdiutil, when running on an Intel machine, now defaults to creating an image with a GUID partition table rather than an Apple partition map like it used to. 10.4 and 10.5 can handle this fine, but 10.3.9 can't and thus refuses to mount the image. The solution is simple: just pass -layout SPUD as an additional argument to hdiutil to force it to create an Apple partition mapped image.One of the first thing many Cocoa programmers do when starting up a new project is to add a breakpoint on -[NSException raise]. This makes it much easier to find out when exceptions are getting raised in your code and debug them quickly. I had this setup already, but when running under Leopard, I was getting exceptions thrown, but my breakpoint wasn't getting hit. Turns out this has changed (at least for the cases I was seeing) under Leopard, so to experience the new exception debugging hotness, try a breakpoint on objc_exception_throw.Similarly, I was trying to break on NSLog to find out where some error messages were being printed out that I couldn't track down. NSLog wasn't getting hit, and it turns out that the printout was coming from CFLog instead.Well, that's what I've got for now, I may add more to the list later as I come across them. Hopefully this will help somebody out there (or maybe myself in a couple months when I forget and have to relearn this stuff over again).