ぽんぽこ日記

プログラミング、読書、日々の生活

XCode でユニットテストするときのはまりポイント

XCode でObjective-Cのコードをユニットテストする場合、
http://developer.apple.com/tools/unittest.html
で書かれている内容以外に、下記の設定が必要。

テストターゲット=>右クリック[Get Info]、[ビルド]タブで下記の設定を変更する。


Architectures
Build Active Architecture Only
=>OFF
アーキテクチャ
=> Native Architectures of Build Machine

Linking
Bundle Loader
=> "$(BUILT_PRODUCTS_DIR)/<>.app/Contents/MacOS/<>"

Unit Testing
Test Host
=> "$(BUILT_PRODUCTS_DIR)/<>.app/Contents/MacOS/<>"

GCC4.0 Language

C Language Dialect => Compiler Default