cd to root i.e. cd / and run another command "sudo ln -s /Applications/Xcode.app/Contents/Developer Developer"
if your mac has got cmake then
run "python opencv/platforms/ios/build_framework.py iOS"
else
run "xcodebuild -license"
download cmake(cmake-3.1.0-rc1) source from http://www.cmake.org/download/
cd to the downloaded source and run "./configure && make && make install"
run "python opencv/platforms/ios/build_framework.py iOS"
Opencv2.framework is ready to use in you Xcode code