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.
- @mjschranz sorry about that, they told me they'll have more next week. It's okay though, I'll bring some in tomorrow. With some celery! 3 years ago
- So I thought I overwrote my .git subfolder today. Took a while to figure out I actually didn’t. Had my work on GitHub anyway, but still. 4 years ago
- @colorgrading I don’t have experience or know anyone who can develop plugins for FCP. I only did it once a while ago for a project. Sorry! 4 years ago
- RT @dhhodgin: Hacked our phone systems system admin password. Totally going to set @mbuttu 's display name to 'momomomomomo' 4 years ago
- OH: “Maybe I should edit this in vi”. Yes. 4 years ago