This project is born out of my frustrations with limited documentation, advice and support for unit testing iPhone apps.
This will be a defined method of unit testing iOS applications through a combination of templates, protocols and helpers.
At the moment this is just a work in progress, I'll announce soon when its ready.
To install the library you can follow the method as described by Jonah Williams in his excellent article Using Open Source Static Libraries in Xcode 4 which tells us to do the following.
Download the entire git repos into a folder somewhere, I'll refer to the folder this creates as {iOSUnitTestingMadeEasyFramework/}
I'll refer to the project you are adding this to as {MainProject}
- Open the project you wish to add the framework to
- File -> Save as workspace
- Right click on the project navigator (left hand column) -> Add files to {MainProject}
- Navigate to {iOSUnitTestingMadeEasyFramework/iOSUnitTestingMadeEasyFramework.xcodeproj}
- Uncheck copy items into destinations folder
- Click Add
- Select {MainProject} in the project navigator
- Select {MainProject} in the Targets section of the second column from left.
- Open the "Link Binary With Libraries" build phase
- Click the +
- Select the file iOSUnitTestingMadeEasyFramework.a
- Click "Add"
The file iOSUnitTestingMadeEasyFramework.a should show up in the left hand column and it will be red, which is rather alarming but not to worry.
- Select {MainProject} in the project navigator
- Select {MainProject} in the Targets section of the second column from left.
- Select the "Build settings" tab
- Search for "User Header Search Paths"
- Double click on the field
- Check the "Recursive" icon
- Enter "$(BUILT_PRODUCTS_DIR)"
- Go to the schema drop down "{MainProject} > iPhone 5.0 Simulator"
- Select the "Build" tab
- Click "+" and add the iOSUnitTestingMadeEasyFramework
- Set it to the first framework
- Ensure all checkboxes are checked
Drag all files in the protocol folder and headers folder in iOSUnitTestingMadeEasyFramework over into your project, DON'T add them to any targets.