LoginSignup
1
4

More than 5 years have passed since last update.

CocoaPodsのインストールと使い方

Last updated at Posted at 2017-12-05

インストール

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
1
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
4