1.cd ~/<my_working_directory>
2.git clone git://code.opencv.org/opencv.git
3.cd /
4.sudo ln -s /Applications/Xcode.app/Contents/Developer Developer
5.cd ~/<my_working_directiory>
6.python opencv/ios/build_framework.py ios
7.If everything’s fine, after a few minutes you will get ~/<my_working_directory>/ios/opencv2.framework. You can add this framework to your Xcode projects
PS:1.http://aptogo.co.uk/2011/09/opencv-framework-for-ios/
2.http://docs.opencv.org/doc/tutorials/introduction/ios_install/ios_install.html#ios-installation