Adding unit tests in Xcode 4 is easy if you want to use OCUnit. Instructions to do this can be found here. This post assumes that you have created an Xcode 3 project with default settings and want to create application tests for it in Xcode 4. When you open this project in Xcode 4 and try to run your unit tests, you will get a Mach-O linker error. For example, if you have a class named AppDelegate located in AppDelegate.h, this error will occur when you try to #import the AppDelegate.h file to make use of your AppDelegate class in your unit tests. This is because in Xcode 3, the default build setting in your application target for Strip Debug Symbols During Copy is Yes for both Debug and Release builds. You want this to be No, at least for your Debug builds. You can keep this setting as Yes for release builds if you want to limit the chances of someone reverse engineering your application. The blog post Tired of getting Mach-O Linker errors when unit testing? by Drew Crawford was very helpful when dealing with this issue.