インストール
sudo gem install cocoapods -n /usr/local/bin
pod setup
プロジェクトごとに使用
xcodeで新規作成(PodTest)
xcodeを閉じる
cd Podtest
pod init
ファイルが作成される
ll
-rw-r--r-- 1 imajo staff 253 12 5 23:42 Podfile
drwxr-xr-x 7 imajo staff 224 12 5 23:42 podTest
drwxr-xr-x@ 5 imajo staff 160 12 5 23:42 podTest.xcodeproj
Podfileで入れたいライブラリを指定
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'podTest' do
pod 'JSQMessagesViewController'
end
インストール
pod install
.scworkspaceファイルで開く
open podTest.xcworkspace/
search pathの設定
BuildSetting > Linking > Runpath search pahts
に、以下を追加
$(inherited) @executable_path/../Pods/Frameworks