Xcode cloud cache

I see that the cache function is not working. I want to cache some build folders, cocoapods,...Please help me. Thanks!

One possible workaround is to leverage DerivedData. Xcode Cloud caches the DerivedData folder and restores it on subsequent runs. So you can theoretically copy or move some files you need using a post-xcodebuild script: https://developer.apple.com/documentation/xcode/writing-custom-build-scripts.

DerivedData is restored right before the post-clone script runs. Thus inside of post-clone you can copy/move the files back to their original location. In our case we were building a Kotlin Multiplatform framework, and we were able to copy the built framework and artifacts into derived data to avoid having to rebuild the binary on the next run.

One thing worth mentioning though is that our workflow is triggered off of changes to a single branch (master). I don't think cache gets shared across separate branches or workflows. So this won't work if you are frequently running builds on new branches (e.g. for pull requests).

Xcode cloud cache
 
 
Q