最終更新:2023-09-06 (水) 13:49:41 (231d)
CocoaPods
Top / CocoaPods
The Objective-C Library Manager
ドキュメント
インストール
- これでいけた
sudo gem install cocoapods
- 反応があるまでちょっと時間かかる
エラーが出る場合
ERROR: Error installing cocoapods: The last version of activesupport (>= 5.0, < 8) to support your Ruby & RubyGems was 6.1.7.6. Try installing it with `gem install activesupport -v 6.1.7.6` and then running the current command again activesupport requires Ruby version >= 2.7.0. The current ruby version is 2.6.10.210.
- sudo gem install activesupport -v 6.1.7.6
- https://stackoverflow.com/questions/75755162/activesupport-error-when-installing-cocoapods-using-sudo-gem-install-cocoapods
メモ
sudo gem install -n /usr/local/bin cocoapods
- 下記だとエラー
sudo gem install cocoapods
コマンド
セットアップ
- pod setup
- 上記のコマンドを実行すると、「~/.cocoapods」ディレクトリに「CocoaPods/Specs」にあるファイルが展開されます。
- CocoaPodsは「~/.cocoapods」ディレクトリ内のファイルを利用してライブラリの管理を行っています。
使い方
使うライブラリの指定
- Podfileを書く