The build process for XCode is a bit of a mystery to me. As a rule, I fire up XCode, write come code and run it and building 'just happens' in the background. That's actually the way I like it. Problem is, I was working on a Mac application where this was far from an optimal experience.
The application consisted of a workspace in which I had the main application and a set of seven frameworks. It was by no means a large application but I was finding that even a single line change would force a rebuild of the whole application and that rebuild was taking over 2 minutes to complete. A real drain on my productivity and very irritating.
I lined with it for a long time, not having the experience to be able to sort it out. After a while, though, I was forced to delve into the murky waters of the build process.
Accessing the build log
Once you have run your build, you can select the build log tab in the program explorer on the left of your XCode window. This will display a list of the most recent builds and the detail of those beings, along with the time each step took, in the right pane.
Looking for problems
Scanning through the build log, which is very long for this size of build, it becomes clear that most steps in the build process are sub-second. That's to be expected in a typical build, though it can be longer of there are a lot of graphical assets. This helped to identify a potential bottleneck in the build process when I spotted a line in the log for a process that took over 25 seconds.
This step if run for each framework in the workspace, contributing to the vast majority of the build time. This was my issue then.
A little time spent on the internet led me to the conclusion that this step could be safely bypassed for development builds.
Bypass the verification
Navigating to the project for the framework, selecting the target and checking the build settings, you can filter on 'verif' to find the offending setting.
By default, this option will be set to YES. This causes the module verification process to run, slowing the build to a crawl. Changing this option to NO stops the verification and makes the build for the framework drop to 1-2 seconds.
Making this change has taken a slow and frustrating build process into a near instant process that allows me to make the changes I need to in my code and to test them without long waits.