Search code examples
cocoapods

Adding 'source' to Podfile causes trunk to be ignored


I read the documentation on the source statement, however it seems outdated or missing details. The documentation says:

The official CocoaPods source is implicit. Once you specify another source, then it will need to be included.

However, it does not state exactly how to reference the official CocoaPods source on that documentation page. Looking at other pages in the documentation it would suggest the official source would be:

source 'https://github.com/CocoaPods/Specs.git

However, when you add that source to your Podfile and run a pod command it will go ahead and download another copy of the repo spec instead of using the Trunk spec which was being used just moments before. For example, if you run 'pod outdated' you will get:

Cloning spec repo cocoapods from https://github.com/CocoaPods/Specs.git

This seems incorrect. It should not be necessary to download another copy of the spec if the pod commands were able to run updates just moments before the new source statement was added to the Podfile.

Do I have the wrong URL for the official spec file? Or is this expected behavior in the tool?


Solution

  • The default main source has been a CDN for the last few minor releases.

    Use source 'https://cdn.cocoapods.org/' instead.