Skip to content

Setting Up Kiwi 2.x without CocoaPods

Ben Blakely edited this page Aug 16, 2013 · 8 revisions

The recommended means of adding Kiwi to a project is to use the CocoaPods-based setup described in Getting Started with Kiwi 2.0. However, if you would prefer to set up Kiwi without using CocoaPods, you can follow the steps described here.

There are two ways; First: Importing Kiwi project into your Xcode workspace, which is basically what CocoaPods will do for you and second is Importing Kiwi as a framework, which is better if you prefer to keep your project/workspace simple.

Below steps assume Kiwi has been downloaded and there is an existing project with at least one unit-test target.

Adding Kiwi as a project into your Xcode workspace

  1. Add the Kiwi project to the Xcode workspace.
  2. Add the Kiwi headers directory to User Headers Search Path of the test target.
  3. Add the libKiwi.a static library to the test target.
  4. Add -ObjC to the Other Linker Flags of the test target.[1]

See Guide: Up and Running with Kiwi for details of setting up a test project and adding the Kiwi library.

Adding Kiwi binary into your Xcode project

  1. Select Project > Scheme > Kiwi-iOS from Xcode menu bar and then build it (Cmd+b). Building might take a while since it will compile i386 and arm architectures. When it finishes a finder window will show a folder containing Kiwi.framework
  2. Drag and drop Kiwi.framework to somewhere in your project.
  3. Add Kiwi.framework to Link Binary with Libraries of your test target.
  4. Add -ObjC the Other Linker Flags of the test target. [1]

For more information about setting up a unit-test target, see Apple's Xcode Unit Testing Guide.

[1]: Old compilers/linkers (prior to Xcode 4.5) might additionally need -all_load or -force_load libKiwi.a