【iOS】cocoaPods master repoの修復方法
iOSアプリにcocoaPodsでAdMobを組み込もうとしたが、なぜか古いバージョンのAdMob(6.12.2)しかインストールできない。
最新版は7.3.1なのに。
ちなみに、Podfileには以下を記述。
pod installすると、以下のエラーが表示される。
[!] Unable to satisfy the following requirements: - `Google-Mobile-Ads-SDK (~> 7.0)` required by `Podfile`
なので、, '~> 7.0'
の部分を削除してpod installしていた。
原因
Macに入っているcocoaPodsのmaster repoが壊れているっぽい。
updateできていない。
$ pod update Setting up CocoaPods master repo Setup completed [!] CocoaPods was not able to update the `master` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`
解決方法
master repoを削除し、再度setupを実行する。
$ pod repo remove master Removing spec repo `master` $ pod setup Setting up CocoaPods master repo Setup completed