Enable continuous store delivery on React Native for iOS and Android with Fastlane, Gitlab CI and react-native-config

Context and reasoning

Continuous delivery is a powerful tool that helps your team automate your app distribution without the tedious manual builds that make you lose a considerable amount of time. In fact, compared to a team that manually de…


This content originally appeared on DEV Community and was authored by Aboubacar Doucoure

Context and reasoning

Continuous delivery is a powerful tool that helps your team automate your app distribution without the tedious manual builds that make you lose a considerable amount of time. In fact, compared to a team that manually delivers their apps at the end of every development cycle, a continuous delivery workflow enabled team is proved to make them [highly performant](Evidence and case studies - Continuous Delivery). I have experienced this radical shift in mindset first hands when I helped implement for one of my squads the following complete workflow. ::youtube-video[Video of a cat in a box]{#vkqPlbTcoi8}

::postep[Add a new item]{#2 difficulty=hard duration=30min}

Pre-requisites

  • A working Gitlab installation, whether it is self hosted or a gitlab hosted

  • A react-native app that builds both on iOS and Android. This setup was done on React-Native 0.73.6

  • A machine with brew installed, ruby and gem (both are already present if you're using any recent mac version)

Installations

  • Fastlane is available via brew
  brew install fastlane
  • Typical React-Native cli tools

Local configuration

Let's start by making Fastlane work locally for building and uploading a beta application to both the App Store and Google Play Store.

iOS

First head to your ios folder inside the app:

cd ios
  1. Init fastlane Fastlane will create a folder and initialize the necessary files
   fastlane init
  1. Init fastlane match Fastlane Match is a convenient way of sharing Apple certificates and provisioning profiles across a team without the hassle of creating a distinct set of files for each and every member. Fastlane stores the generated files on a remote folder (the default option is a secured git repository). Since we are on Gitlab we'll be using a handy feature that this platform offers: secure files.

  2. Setup Gitlab repository cert files

Gitlab figure If you have a self hosted Gitlab installation via Helm, enable

   global:
   common:
     ...
     ciSecureFiles:
       enabled: true

4.

Configure Fastlane for Android

Configure Gitlab

Wrapping up

When used with Gitlab CI, Fastlane can be a powerful tool to automate the delivery of your React-Native app to the stores, but one should note the setup process is not straightforward, whether it's the local configuration or the remote operations. Hopefully you can kickstart your own easily with my trials and errors.

I wish there is a better tool that is more modern and more comprehensive than fastlane, as its language itself (ruby) is not familiar to a regular React-Native developer.

Inspirations and references

*


This content originally appeared on DEV Community and was authored by Aboubacar Doucoure


Print Share Comment Cite Upload Translate Updates
APA

Aboubacar Doucoure | Sciencx (2024-09-22T18:56:56+00:00) Enable continuous store delivery on React Native for iOS and Android with Fastlane, Gitlab CI and react-native-config. Retrieved from https://www.scien.cx/2024/09/22/enable-continuous-store-delivery-on-react-native-for-ios-and-android-with-fastlane-gitlab-ci-and-react-native-config/

MLA
" » Enable continuous store delivery on React Native for iOS and Android with Fastlane, Gitlab CI and react-native-config." Aboubacar Doucoure | Sciencx - Sunday September 22, 2024, https://www.scien.cx/2024/09/22/enable-continuous-store-delivery-on-react-native-for-ios-and-android-with-fastlane-gitlab-ci-and-react-native-config/
HARVARD
Aboubacar Doucoure | Sciencx Sunday September 22, 2024 » Enable continuous store delivery on React Native for iOS and Android with Fastlane, Gitlab CI and react-native-config., viewed ,<https://www.scien.cx/2024/09/22/enable-continuous-store-delivery-on-react-native-for-ios-and-android-with-fastlane-gitlab-ci-and-react-native-config/>
VANCOUVER
Aboubacar Doucoure | Sciencx - » Enable continuous store delivery on React Native for iOS and Android with Fastlane, Gitlab CI and react-native-config. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/09/22/enable-continuous-store-delivery-on-react-native-for-ios-and-android-with-fastlane-gitlab-ci-and-react-native-config/
CHICAGO
" » Enable continuous store delivery on React Native for iOS and Android with Fastlane, Gitlab CI and react-native-config." Aboubacar Doucoure | Sciencx - Accessed . https://www.scien.cx/2024/09/22/enable-continuous-store-delivery-on-react-native-for-ios-and-android-with-fastlane-gitlab-ci-and-react-native-config/
IEEE
" » Enable continuous store delivery on React Native for iOS and Android with Fastlane, Gitlab CI and react-native-config." Aboubacar Doucoure | Sciencx [Online]. Available: https://www.scien.cx/2024/09/22/enable-continuous-store-delivery-on-react-native-for-ios-and-android-with-fastlane-gitlab-ci-and-react-native-config/. [Accessed: ]
rf:citation
» Enable continuous store delivery on React Native for iOS and Android with Fastlane, Gitlab CI and react-native-config | Aboubacar Doucoure | Sciencx | https://www.scien.cx/2024/09/22/enable-continuous-store-delivery-on-react-native-for-ios-and-android-with-fastlane-gitlab-ci-and-react-native-config/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.