iMac:~ Mac$ sudo gem update --system
iMac:~ Mac$ sudo gem install -n /usr/local/bin -v 0.35.0 cocoapods
Password:
Fetching: xcodeproj-0.20.2.gem (100%)
Successfully installed xcodeproj-0.20.2
Fetching: open4-1.3.4.gem (100%)
//省略
Parsing documentation for cocoapods-0.35.0
Installing ri documentation for cocoapods-0.35.0
11 gems installed
iMac:~ Mac$ pod setup
Setting up CocoaPods master repo
Setup completed
Projectフォルダへ移動
cd OpenCVExample01
Pod fileを編集
iMac:OpenCVExample01 Mac$ vi Podfile
platform :ios,'9.0'
use_frameworks!
target 'OpenCVExample01' do
pod 'OpenCV'
end
iMac:OpenCVExample01 Mac$ pod install
Analyzing dependencies
Downloading dependencies
Installing OpenCV (3.0.0)
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use OpenCVExample01.xcworkspace
for this project from now on.
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total
pod installed.
以上でCocoaPods OpenCVのインストールが行えました。
Podfileを下記のように記述
platform :ios,'9.0'
use_frameworks!
target 'ターゲット先(プロジェクト名やプロジェクトのテスト名)' do
ここでpod 'OpenCV'等を記載する
end