Downloading CocoaPods specs from S3 instead of Git

ios
cocoapods

#1

We have recently enabled a feature that will allow CocoaPods to download the specs over HTTP instead of Git. This will considerably speed up the specs checkout step when running CocoaPods and therefore reduce the total build time for iOS builds.

The feature has been automatically enabled for all customers who use our inferred iOS dependency commands. If you are using iOS inference for the dependencies step, you will notice a new step, Fetch CocoaPods specs, in your build:

At this moment the feature is only available as an inferred step.

We maintain the service that downloads the specs from Git and makes them available over HTTP. The specs on our HTTP service are updated every 30 minutes.

Please add a comment here if you have any questions about this functionality.


Downloading Cocoapods from S3 in projects with manual configuration
#2

One of my projects simply didn’t start to use the new step, even though I’m using iOS inference for the dependencies step, can you help me to include this new step in my builds?


#3

Hi Cesar, could you please reach out to support via the in-app support dialog? We’ll take a look at that.


#4

Hi, our plan here is the Seed one, I think I’m not able to reach out via in-app support =( Is it possible for you to message me or maybe help me through the forum?


#5

Sorry for confusion.

Could you please post your circle.yml file here, removing all the confidential data that might be in it?

Also, could you please check if you are overriding inference commands in your project’s settings in the CircleCI UI?


#6

here is the circle.yml:

machine:
pre:
- sudo rm ‘/usr/local/bin/rake’
- sudo rm ‘/usr/local/bin/rdoc’
- sudo rm ‘/usr/local/bin/ri’
- brew install ruby && brew link --overwrite ruby
xcode:
version: "8.0"
environment:
XCODE_SCHEME: "xxx"
XCODE_WORKSPACE: “xxx/xxx.xcworkspace”

dependencies:
pre:
- sudo pip install transifex-client
- if [ true ]; then [[ ! -s “$(git rev-parse --git-dir)/shallow” ]] || git fetch --unshallow; fi
cache_directories:
- “~/.cocoapods”
- "Pods"
post:
- gem cleanup
- gem update fastlane

test:
override:
- echo “there are no tests yet”

deployment:
staging: # just a label; label names are completely up to you
branch: /^(?!master$).*/ commands: - tx push -s - agvtool new-version -all (git rev-list --count HEAD)
- fastlane xxx1
production:
branch: master
commands:
- agvtool new-version -all $(git rev-list --count HEAD)
- fastlane xxx2

exactly now I’m overriding the inference commands in the UI but simply because I needed to install cocoapods, but even in builds where there were nothing there I still had the problem in which this new step does’nt appear even though in another project the step was added.


#7

The faster downloads of CocoaPods specs from S3 are currently only available through the inference commands. Therefore if you override the inference commands in your circle.yml or in the project settings, the step will not be run.

Could you please try removing the override for the dependency commands in the project settings and see if the download step gets run then? Thanks.


#8

I removed the override for the dependency commands in the project settings but the download step still does’t not run. Do you have any other suggestions? Thanks!


#9

Could you please try pushing a new commit to your project so that a build with new settings is generated?


#10

Hi Alexey,

Me and Cesar work on the same team.
We just pushed a new commit but the build didn’t use the new inferred option.
I’m not sure if it’s related, but the “Install CocoaPods” step is not being inferred either.

Thanks for your help


#11

I see, thank you for elaborating on that.

Do you have your Podfile and Podfile.lock checked into the repo? Is the Pods directory also checked in?


#12

We have both Podfile and Podfile.lock checked in the repo.
The Pods folder is not checked in and it is listed on the the .gitignore


#13

If your Podfile located in the root of the repo?

Could you please try rebuilding without cache? Part of the Pods directory might have been cached and that might be preventing the inferred dependency commands from running.

Thanks.


#14

The Podfile is in the root of the repo.

I just tried rebuilding without cache but I got the same results…

More ideas?


#15

We found the problem.
There was a file committed inside the Pods folder…
Thanks for the help and sorry for not noticing this before!


#16

Any idea when this will be available outside of iOS inference? The inference step is picking up other things I don’t want to run so I’m not able to use this, as far as I can tell.


#17

It is now possible to use this feature without iOS inference. Please check out this post for an example. Thanks!


#18