OpenCV-iOS makes it easy to build OpenCV for iOS. It contains a submodule that will pull a recent copy of the OpenCV source code. It also contains an Xcode project that builds OpenCV static libraries that you can add to your project.
In order to also checkout the OpenCV source code which is included as a git submodule,
clone the project using the
git clone --recursive https://github.com/jonmarimba/OpenCV-iOS.git
If you've already cloned the project, run the following commands from within the OpenCV-iOS directory:
git submodule init git submodule update
Take a look at the SURF project in the examples directory, paying special attention to the Header Search Path build settings in the target of the Xcode project for an idea of how to integrate the OpenCV Libraries into our project using the OpenCV-iOS Xcode project to build the libraries on demand.