Broken Xcode 4 project templates

The other day I received a crash report from one of my projects that included a symbolicated crash log. This was very strange as I’ve never received a symbolicated crash log for an iOS project; I’ve always had to match it up with the dSYM file that I’ve stored away. After a little research, I found that some settings in the project didn’t strip out the debug symbols. I found an older article on Apple’s developer site that seemed to address this. I flipped on the switches and the project size dropped by 500K which would make sense.

The next step was to see how I missed these switches. The default Xcode 4 template for an iOS navigation based app has the following:

STRIP_INSTALLED_PRODUCT = YES

for the release build. However, the article above indicates that the following flag must also be on for the above one to have any effect.

Xcode provides several built-in options for stripping executables of their debugging symbols. One of these is the Strip Linked Product build setting. While typically set, it has no effect unless the Deployment Postprocessing setting is also set. Deployment Postprocessing is a master switch that enables the action of a host of other build settings. It’s approximately analogous to running the xcodebuild tool with the install command.

DEPLOYMENT_POSTPROCESSING = YES

Unfortunately it’s a bit hard to test with a basic project as the file size is too small. However, I opened the CTPageViewer sample app and tested with DEPLOYMENT_POSTPROCESSING on and off and with it off, the file size was definitely larger indicating that the flag must be set to YES.

So, did Apple mess up the default project? If you have your own template (which I might cover in another most), you can change the settings. If Apple didn’t mess up, what am I missing?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.