Building OpenCV 3.0.0 for iOS Applications

Getting an Xcode framework version of OpenCV built used to be a pretty hair-raising exercise in yak-shaving. It’s gotten a whole lot easier lately.

First, check out the OpenCV sources:

cd ~
git clone https://github.com/Itseez/opencv.git
cd opencd/
git checkout 3.0.0

You’ll need to make a symbolic link to Xcode’s developer tools so everyone can find things:

cd /
sudo ln -s /Applications/Xcode.app/Contents/Developer/ Developer
cd ~/opencv

All you need to do is have python run the build. Works flawlessly.

python platforms/ios/build_framework.py ios

Walk away from the keyboard for half an hour, when you get back, you’ll have a nice opencv2.framework in ~/opencv/ios/…

Leave a Reply

Your email address will not be published. Required fields are marked *