Using cache pods, React Native can speed up iOS builds by 4 times.

Davyd NRB
4 min readDec 27, 2022

I’m the type of person who can’t stand waiting, so it seems fortunate that I chose to work with iOS apps 🙃 (sarcasm)

However, I believe you should be aware of the suffering involved when developing an iOS app using CI.

🖥️ Let's have a look at our setup (GitHub Actions):

OS: macOS 10.15.7
CPU: (4) x64 Intel(R) Xeon(R) CPU E5–1650 v2 @ 3.50GHz
Memory: 8.11 GB / 12.00 GB

🗄️ Cache sizes:

node_modules: ~852 MB
pods: ~115 MB
pods derived data: ~1258 MB

⏲️ Build time:

So how do you see that I save 33 minutes? 😲🎉💃!

I hope the results are impressive and you want to know how to attain them. 😉

I’ve read 📖 numerous papers describing various strategies, including:

1) ccache
2) Rome tool
3) cocoapods-binary-cache — work strangely for me, built only 4 dependencies that no effect on build speed.
4) cocoapods-binary — required to use `use_frameworks!`

I observed that whereas native code updates were few, JavaScript side changes were frequently made. Building native code also takes up a significant portion of the…

--

--

Davyd NRB
Davyd NRB

Written by Davyd NRB

React Native guru 🧘\ DevOps adjutant \ Linux lover ❤️