Tuesday, December 4, 2007

Purpose of Build Phases

There are distinct things that are necessary to create a working application. The first, "Copy Bundle Resources" just does a simple copy to make sure that the things like nibs are in place. The next is Compile Sources, which actually does the compilation, and the final default stage is to Link, which makes sure that the compiled sources will be able to get at their dynamic libraries on disk (or statically link in some cases).

In theory, building is abstracted to one phase, but really each of those three phases are configurable (e.g. specify what libraries it is to be linked with or want a copy of the library in the Application.app/Contents/Frameworks/ folder). Hence, separate phases.

Friday, August 3, 2007

Samples and Symbolicating

Samples: If I asked you to, for example, test the water in a pool for contaminants, you'd likely go to the pool and take out a portion of the water and send it in for testing. the sample is used as a baseline for what the whole represents. in software engineering, a "sample" is much the same -- basically, we introspect the application for a duration of time and watch *everything* that is going on. the result are "trees" of "call stacks", which are just the sequence of methods/functions called during the sample period. So, when mail "spins" on you, you can sample it and get a list of all of the threads and what each was doing. this allows developers an easy way to find performance bottlenecks (the samples are sorted by highest to lowest frequency of invocation), or to see deadlocks and recursions.

CrashReporter: http://developer.apple.com/technotes/tn2004/tn2123.html

Thursday, June 28, 2007

Uncaught Exceptions in Xcode

Do you receive internal errors due to uncaught exceptions in Xcode?  Here is how to find the root of the problem:

Start Xcode under GDB and throw a breakpoint on -[NSException raise:]