LoginSignup
1

More than 5 years have passed since last update.

rvm+UnityのPostProcessBuildにてcocoapodsが上手く動かない問題の解決法

Last updated at Posted at 2017-05-30

Unityにて広告SDKを利用する際などに、
iOSのPostProcessBuild内でcocoapodsを利用する場合がある。

その際ビルド端末にcocoapodsをインストールしていないと以下のエラーがでるが、
内容にしたがってコマンド叩いても変化がないケースがある。

Error running cocoapods. Please ensure you have at least version 1.0.0.  You can install cocoapods with the Ruby gem package manager:
 > sudo gem install -n /usr/local/bin cocoapods
 > pod setup

このとき、rvmが原因の可能性がある。
以下の通りsystemのrubyに切り替えてcocoapodsのインストールを行えばよい。

$ rvm use system
$ sudo gem install -n /usr/local/bin cocoapods
$ pod setup

cocoapodsに限らず、
PostProcessBuildにてrubyのgemを利用している場合は同様のことが言える。

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