Skip to content

Instantly share code, notes, and snippets.

@tedgonzalez
Created January 5, 2020 16:34
Show Gist options
  • Save tedgonzalez/782f5bc5131075e653d99f308dc70919 to your computer and use it in GitHub Desktop.
Save tedgonzalez/782f5bc5131075e653d99f308dc70919 to your computer and use it in GitHub Desktop.
Cache cocoapods when using circleci
- restore_cache:
key: 1-pods-{{ checksum "Podfile.lock" }}
- run:
name: Install CocoaPods
command: |
if [ ! -d "Pods" ]
then
curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf
bundle exec pod install
fi
- save_cache:
key: 1-pods-{{ checksum "Podfile.lock" }}
paths:
- ./Pods
@Noodlekim
Copy link

@tedgonzalez
Hello.
I used to test with this code, but it doesn't work now.
Would you check it again, if it is working?

@tedgonzalez
Copy link
Author

Hi @Noodlekim
From circle ci:

We no longer recommend using the S3 mirror for cocoapods as it has not been updated in many months. Since Cocoapods 1.8, it is better to use the CDN method of retrieving pods as it has better reliability and is generally faster: https://circleci.com/docs/2.0/testing-ios/#optimizing-cocoapods 59

Cocoapods 1.9 isn’t working very well with Xcode 12 at the moment, so in the next image (12 beta 4) we will be shipping Cocoapods 1.10 beta which brings Xcode 12 support. Keep a check on the announcements section as it shouldn’t be long before this is rolled out!

source: https://discuss.circleci.com/t/cocoapods-download-from-s3-is-failing-with-xcode-12/36947/2

@Noodlekim
Copy link

@tedgonzalez
I'm so sorry about the late reply, and thanks for your kind answer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment