Letβs try this xccache tool with the Kickstarter iOS project.
I forked the project to trinhngocthuyen/kickstarter-ios. Check out the branch try/xccache for the detailed integration.
Following are the steps needed for the integration.
xccache
to GemfileThen, run bundle install
to have it installed.
Specify the git repo for the cache in xccache.yml
.
remote:
default:
git: https://github.com/trinhngocthuyen/.cache.git
Then, pull the cache from the given repo:
bundle exec xccache remote pull
Now, the cache should be available in ~/.xccache/debug
.
$ tree ~/.xccache/debug -L 2
/Users/thuyen/.xccache/debug
βββ Alamofire
βΒ Β βββ Alamofire-513364f8.xcframework
βββ AlamofireImage
βΒ Β βββ AlamofireImage-1eaf3b6.xcframework
βββ Apollo
βΒ Β βββ Apollo-5db23797b.xcframework
βββ ApolloAPI
βΒ Β βββ ApolloAPI-5db23797b.xcframework
βββ ApolloUtils
βΒ Β βββ ApolloUtils-5db23797b.xcframework
βββ AppboyKit
βΒ Β βββ AppboyKit-a3511ca.xcframework
βββ AppboySegment
βΒ Β βββ AppboySegment-dc659b7.xcframework
βββ AppboyUI
βΒ Β βββ AppboyUI-a3511ca.xcframework
bundle exec xccache
to integrate the cacheThere are some highlighting changes as follows:
xccache.lock
that captures the dependencies in the project.Tip: You should trigger this after running xccache command because Xcode doesnβt auto-resolve dependencies upon changes in xccacheβs package manifest.
And observe the build time when having cache. The observed buid time on my Macbook Air (M1, 2020) is just nearly 2 minutes π.