Example how to reduce React Native iOS build times drastically

Overview

Reduce React Native iOS build times

Introduction

Amount of code in pods can be huge. Pods don’t change often. On CI, all pods are compiled over and over again, which is very time intensive. What if we compile Pods once and use the result over and over again? This repo contains a demo how to accomplish this.

Based on this blogpost

Demo

  • clone this repo
  • run yarn install
  • cd ios
  • run pod install
  • run gem install (?)
  • run bundle exec fastlane ios cached_build for first time
  • check build time, and notice existens of folder cached_derived_data
  • run bundle exec fastlane ios cached_build again
  • check build time

If everything worked well, you'see a drastically smaller build time the second time.

First build, without cache:

+------+------------------+-------------+
|           fastlane summary            |
+------+------------------+-------------+
| Step | Action           | Time (in s) |
+------+------------------+-------------+
| 1    | default_platform | 0           |
| 2    | gym              | 384         |
+------+------------------+-------------+

Second build:

+------+------------------+-------------+
|           fastlane summary            |
+------+------------------+-------------+
| Step | Action           | Time (in s) |
+------+------------------+-------------+
| 1    | default_platform | 0           |
| 2    | gym              | 63          |
+------+------------------+-------------+

CI

On CI, you can do the followwing in your build script:

  1. first try to download <md5 of Podfile.lock>.zip from your favorite storage system (Azure Storage, S3 bucket, FTP, etc...)
  2. If success, unzip into ios/cached_derived_data
  3. Run bundle exec fastlane ios cached_build
  4. If <md5 of Podfile.lock>.zip didn't exist, zip cached_derived_data and upload it somewhere as <md5 of Podfile.lock>.zip

This way, only when Podfile.lock changes, Pods will be compiled.

Presentation

https://docs.google.com/presentation/d/e/2PACX-1vTfrXqbjTRAYCABpStRknZeCX83ku_MOzGsa0ZOq7D_JPqcYxBrrc67hLOsK1RQnKV7i94zJnAmPubZ/pub?start=false&loop=true&delayms=3000

You might also like...

An example on how to build a configurable widget to trigger external searches along with Liferay search to Elasticsearch.

An example on how to build a configurable widget to trigger external searches along with Liferay search to Elasticsearch.

Liferay External Searches An example on how to build a configurable widget to trigger external searches along with Liferay search to Elasticsearch. Ge

Oct 25, 2021

Spring Boot Login and Registration example with MySQL, JWT, Rest Api - Spring Boot Spring Security Login example

Spring Boot Login and Registration example with MySQL, JWT, Rest Api - Spring Boot Spring Security Login example

Spring Boot Login example with Spring Security, MySQL and JWT Appropriate Flow for User Login and Registration with JWT Spring Boot Rest Api Architect

Jan 5, 2023

Spring Boot Security Login example with JWT and H2 example

 Spring Boot Security Login example with JWT and H2 example

Spring Boot Security Login example with JWT and H2 example Appropriate Flow for User Login and Registration with JWT and HttpOnly Cookie Spring Boot R

Dec 21, 2022

This module explains about the example of Spring MVC + Database Integration with MySQL using Hibernate ORM with practical coding example and required JAR dependencies

SpringMVC-Database-Integration This module explains about the example of Spring MVC + Database Integration with MySQL using Hibernate ORM with practic

Nov 2, 2021

Metremenqeemi - Android/iOS app to teach the Coptic Language

ⲙⲉⲧⲣⲉⲙⲛ̀ⲭⲏⲙⲓ The Open Source Android/iOS app to learn how to read and understand the Coptic Language Join our Discord Channel About the Curriculum The

Aug 30, 2022

Multi-OS Engine: Create iOS Apps in Java (or Kotlin ... etc.)

Multi-OS Engine Overview Multi-OS Engine provides a Java runtime and Java interfaces to iOS platform API to develop native iOS applications with nativ

Dec 22, 2022

Small app to create icon sets for Linux, Windows, OSX, Android and IOS from a single PNG image

FXIconcreator Small app to create icon sets (multi resolution) for Linux, Windows, OSX from a single PNG image Reason for creating such an app was tha

Aug 4, 2022

Spring JPA Native Query example in Spring Boot

Spring JPA Native Query example in Spring Boot

Nov 30, 2022

A React Native project starter with Typescript, a theme provider with hook to easy styling component, a folder architecture ready and some configs to keep a codebase clean.

React Native Boilerplate Folder structure : src ├── assets │   ├── audios │   ├── fonts │   ├── icons │   └── images ├── components │   ├── Layout.tsx

Sep 1, 2022
Owner
Dirk Postma
Dirk Postma
Sceneform React Native AR Component using ARCore and Google Filament as 3D engine. This the Sceneform Maintained Component for React Native

Discord Server Join us on Discord if you need a hand or just want to talk about Sceneform and AR. Features Remote and local assets Augmented Faces Clo

SceneView Open Community 42 Dec 17, 2022
With react-native-update-in-app library you can easily implement in-app updates in your React Native app using CDN or any other file server

React Native In-App update With react-native-update-in-app library you can easily implement in-app updates in your React Native app using CDN or any o

Nepein Andrey 7 Dec 21, 2022
This is a Food Delivery Mobile Application. Build Using React Native

Ax Food Delivery Service This is a Food Delivery Mobile Application build using ?????????? ???????????? ?? Installation Clone this repository git clon

Mindula Dilthushan Manamperi 13 Jul 14, 2022
In this course, we will learn how to build a complete full-stack web application using Spring boot as backend and React (React Hooks) as frontend

In this course, we will learn how to build a complete full-stack web application using Spring boot as backend and React (React Hooks) as frontend. We will use MySQL database to store and retrieve the data.

Ramesh Fadatare 43 Dec 22, 2022
React wrapper for android and ios

Deepvue Aadhaar Offline e-KYC React Native SDK This is a wrapper over Android and iOS SDK for react native. Aadhaar Paperless Offline eKYC is a secure

null 2 May 10, 2022
Example React Native library written with JSI

react-native-jsi-example This is an example JSI Module for React Native that returns a value from C++ to JS synchronously. Implemented for just iOS. T

Enes 7 Mar 3, 2022
React native wrapper for Jitsi Meet SDK Library that rely on the native view (Activity / ViewController)

react-native-jitsi-meet-sdk React native wrapper for Jitsi Meet SDK Library. This Library implements the Jitsi SDK with a native activity on the Andro

null 7 May 2, 2022
An awesome native wheel picker component for React Native.

⛏️ react-native-picky An awesome native wheel picker component for react-native. Features Supports multiple columns ✅ Supports looping ✅ Native Androi

null 28 Dec 4, 2022
A password strength test app with strength, estimated crack times, warnings and suggestions to help make better passwords.

Is Your Password Secure? A password strength test app which displays strength, estimated crack time and provides warnings and suggestions to help make

the-weird-aquarian 24 Dec 15, 2022
lazy-language-loader improves loading times when changing your language by only reloading the language instead of all the game resources!

lazy-language-loader lazy-language-loader improves loading times when changing your language by only reloading the language instead of all the game re

Shalom Ademuwagun 7 Sep 7, 2022