LoginSignup
8
8

More than 5 years have passed since last update.

言わずと知れた Cocoa Pods ですが、AppCode には Cocoa Pods を AppCode 上から便利に使うための機能が実装されています。

今回はこの機能の使い方を紹介します。

Cocoa Pods Podfile を作成する

File -> CocoaPods -> Cocoa Pods Podfile

スクリーンショット 2013-12-08 02.13.02.png

実行すると、空の Podfile が作成されます。

Podfile を編集する

さすが AppCode、Podfile でさえも補完(Ctrl + Space)が効きます。

Podfile_-_cocoapods_-____Dropbox_cocoapods_cocoapods_.png

いったい

Podfile_-_cocoapods_-____Dropbox_cocoapods_cocoapods_.png

どこまで

Podfile_-_cocoapods_-____Dropbox_cocoapods_cocoapods_.png

補完すれば気が済むのでしょう。
Pod 名まで補完してくれます。

Podfile_-_cocoapods_-____Dropbox_cocoapods_cocoapods_-2.png

Podfile

platform :ios, "7.0"

pod "Reachability", "~> 3.1.1"

今回は上記のような Podfile を用意しました。

Pod をインストールする

インストールしていない Pod が Podfile に追加されると以下の画像のように Pod のインストールを促すリンク状のボタンが表示されます。

Podfile_-_cocoapods_-____Dropbox_cocoapods_cocoapods_-4.png

プロジェクト名を右クリック -> Cocoa Pods -> Installからインストールすることも可能です。

その他

Podfile を後から編集したい場合は プロジェクト名を右クリック -> Cocoa Pods -> Install
Pod のアップデートを行いたい場合は プロジェクト名を右クリック -> Cocoa Pods -> Update

8
8
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
8
8