OCMock for iPhone

Thinking about using OCMock with my Sound-Church project. First off, getting it to build is a challenge, particularly to include the library with the version running on the phone. The solution to that problem is with the linker settings.

Linker flags

Notice the -ObjC -all_load flags. Those are required to load a static library, as the dynamic nature of Objective-C makes it not load those libraries.

I’m still figuring out how to use a fake method with multiple parameters with this tool, however. The available documentation is a bit light. I did find this post, which is about the best I’ve found for using OCMock. Nobody describes using OCMock with Xcode 4, however.

This entry was posted in iOS, Sound Church, XCode and tagged , . Bookmark the permalink.

Comments are closed.