Xcode build time improvement ideas


Hey all!

We’ve received couple of reports of building an xcode project takes too long. This obviously happens because you have a 100% clean environment in each build started, however there are multiple cache approaches you can try.

Caching dependencies

Caching dependencies is an elemental way to save some time in case if bintray or any dependency host has service outages.

Caching build sources

This is where we need to join our power! :rocket: In some case caching DerivedData and/or temp folders are gives you the expected build time boost, but it won’t help most of the times.

To cache DerivedData the simplest way is to set -derivedDataPath ~/dData flag in the xcode steps additional flags inputs, then cache ~/dData folder.

For now this thread is open for collecting feedbacks if you have a long build time, and what did you tried already to speed it up and please attach a filtered build log or xcode part of the build log if you can.

Let’s see if someone have a good idea to try! :wink:

1 Like


A tip for Swift projects: enable Whole Module Optimization, that can improve the build time drastically. See:



If you use the above in pair with the new Recursive Touch for Cache step then xcode cache will 100% work with any non-archive step! Just put Recursive Touch step right before your xcode-test or xcodebuild command.

Let’s try it :wink:

1 Like