This was actually pretty easy. Go to this web site
https://github.com/jonreid/OCMockito
Download the zip releases from each of these frameworks
https://github.com/jonreid/OCMockito/releases/
https://github.com/hamcrest/OCHamcrest/releases/
Expand them and drag in the iOS framework into your project.
Note: When you drag libraries in, you want the libraries, not the source code.
And when you drag them in, make sure you add them to the Test Group
So it should look like this.
And then set the ‘Other linker flags’ by double clicking on your blue project icon.
Note: Flip to your test project target, as this is where we want to add our linker flags.
Then goto ‘Build Settings’ and type ‘Other linker flags’ in the search box and add ‘-ObjC’ to both the debug and release.
If you don’t set the -ObjC correctly you will see this
Note: Make sure you get the LATEST libraries.
Leave a Reply