This article discusses the CI/CD ecosystem status for React Native projects (with a focus on iOS). Thank Apple that Xcode, which requires macOS, is essential to creating iOS apps.
The approaches
Everyone is aware that Xcode is very slow when bundling Objective C code. At the moment we have a lot of strategies to speed up iOS builds. I spread them to two group:
1) Build only Javascript
- 💉 Building and injecting a JS bundle a basic concept: If the native code wasn’t changed, simply create JS bundle and inject it into the precompiled application. (You must take an extra step to convert a js file to bytecode if you use the Hermes js engine.)
- ☁️ If you don’t have the time to put the aforementioned strategy into practice above, you can pay Nitro Build Service (x5 Faster). I gave it a try and was quite delighted with their work:
2) Tricks & Cache
- 💾 Cache Pods may speed up iOS (~x4 Faster) generally very quick, but still has to use MacOS runners
- Docs: Use a compiler cache (Github Action implementation)