0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

[!] CocoaPods could not find compatible versions for pod の解消法

Last updated at Posted at 2023-02-24

1.対処方法1.「pod repo update」
2.対処方法2.「pod repo remove master」

pod repo remove master
pod setup
pod install

3.対処方法3.「リポジトリを更新しなおす」

cd ~/.cocoapods/repos
git clone https://github.com/CocoaPods/Specs.git master

pod setup
pod install

4.解決方法4. Podfileを修正する

iOSとWatchOSは「pod 'AFNetworking', '~> 4.0'」と指定していたのですが、ユニットテストは「pod 'AFNetworking', '~> 3.0'」と別バージョンを指定してしまっていました。

今回、私の場合、podfile上に

source 'https://cocoapods-cdn.netlify.app/'

というのを追加していたが、このようにカスタムsourceを指定する場合は、Cocoapodsマスターソースを明示的に指定する必要があったのに、それをしていなかったためこのエラーが起きていた。以下のように修正したところ、解消した。

source 'https://cocoapods-cdn.netlify.app/'
source 'https://github.com/CocoaPods/Specs.git'

参照: Podfile Syntax Reference

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?