Simple release worflow for react native with expo
Tags: technology, reactnative, workflow, react
Published: 2019-06-11 12:33:58

---
title: Simple release worflow for react native with expo
published: true
tags: technology,react-native,workflow,react
canonical_url: 
---

### Just push a button

#### How much time it takes to release a React Native application to the iOS App Store and Android Play Store

It’s 2pm and my delivery manager is asking me to release our React Native application to the iOS and Android stores.

> “Great! I am happy to release our application, just for your information, this will take an entire day.”  
> “What are you saying? It’s **just pushing a button**.   
> I don’t see why it’s so long?”

[![](https://cdn-images-1.medium.com/max/1024/1*S5nZBi2nDSqZr5-66IY_xg.png)](http://bit.ly/expo-release)<figcaption>I made a drawing for you. I think now you can see why it’s a long process 😉</figcaption>

First of all, there are 2 main application stores (Apple and Google). The release process is a little bit different for each, and the testing workflow is different as well. In this article, I am going to cover a specific scenario: **How to release a React Native application with a standalone build from expo**.

### `create-react-native-app` versus `react-native-cli`

If you are in charge of releasing your react native application, you need to understand 2 different application architectures [generated with your CLI](https://en.wikipedia.org/wiki/Command-line_interface).

#### create-react-native-app

According to [the official documentation,](https://facebook.github.io/react-native/docs/getting-started.html) this solution is the simplest one. You can run your application on any OS with no build config. Xcode or Android Studio are not required. You just have to install another amazing tool called [expo](https://expo.io/).

#### react-native-cli

If you want to use custom component for each platform or add React Native code into your existing application you are probably using this solution.

If you are looking for the workflow when you have “ejected” from expo, I hightly recommand theses 2 articles from the legendary [Gant Laborde](https://medium.com/u/6ca0fe37eac1) 🦄

- [Simple React Native iOS Releases](https://shift.infinite.red/simple-react-native-ios-releases-4c28bb53a97b)
- [Simple React Native Android Releases](https://shift.infinite.red/simple-react-native-android-releases-319dc5e29605)

### Building a standalone app with expo

It’s 2pm and a half because of the coffee break and you are ready to deploy. Let’s do this!  
Check the dependencies and run the build:

```
yarn
exp build:ios
```

This first task takes — at least — 30 minutes. I am lucky, at the office the connection is fast.

> I have an idea, maybe I can run the android build in the meantine.

Bad news rookie. At the moment with expo, you can’t build for iOS and Android at the same time.

**35 minutes later**  
Yeah! Build successful!  
The application is available on expo servers, now I need to download the .ipa file. I am a developer, I can’t be bothered with mouse clicks on a website. Let’s open a terminal and download the build with curl .

```
curl -o app.ipa “$(exp url:ipa)”
```

**28 minutes later**  
Download done!  
Now I need to upload the .ipa file with [Application Loader](https://forums.developer.apple.com/thread/64041) to the apple store servers (Because I don’t need to use Xcode with standalone builds).

**34 minutes 55 seconds later**  
Build uploaded!  
Guess what?  
I can’t push the button yet, because my app is analysed by robots.

![](https://cdn-images-1.medium.com/max/1024/1*MrEpUTCJ8sGp2Cq5ufWEDA.png)<figcaption>Your build is not available yet for your QA team</figcaption>

**10 minutes 12 seconds later**  
My build just disappeared from Testflight! 😱  
Listen to me rookie, releasing a native application is a complex task. You have no idea how works the replication of your build accross all the CDN’s in the world! Give me some time to process your build.

The good new is, you can follow the progress in the activity tab.

![](https://cdn-images-1.medium.com/max/1024/1*Pj6FGs79BSL3q2ggn6xk6g.png)<figcaption>Still processing</figcaption>

**Probally less than 10 minutes later**  
Your app is back again!   
But you have small extras steps to do: Provide export compliance information. It’s simple, _you just need to push a button_.

![](https://cdn-images-1.medium.com/max/667/1*wORNuR3IXBGjTgsFyWMo9g.gif)<figcaption>Push another button for the iOS release</figcaption>

Straight after accepting the compliance your app should be available for your testing team 🎉

But wait a minute. I am not going to repeat this workflow everytime.  
My friends know me [as an automation machine](https://www.youtube.com/watch?v=7_CAqtqEaeo). I wrote this little script to half-automate the process of releasing our react native application with standalone expo build.

Create a new file and run this script from a terminal

```
./bin/ios
```

{% gist https://gist.github.com/flexbox/da9b92a94bef7873280cabcaa74d4fe4 %}

It’s 5pm and your application is released for your end users!  
Are you sure about that?  
Rookie, you forgot the android version. You need to run the same script for your .apk

Even if the engineering team working on expo is the best in the world, you need to test on real devices. Developing with [expo XDE](https://expo.io/tools) is fine, but you can’t rely on the emulator for testing.  
By the way, If you don’t have a [release note](https://uxdesign.cc/design-better-release-notes-3e8c8c785231) and a testing team, there is no point to deploy.

### Creating a slick testing workflow

Testing your application with the real world is hard. Expo is a great solution for developement but it’s not exactly the same as using the final build delivered to your users.

It reminds me this talk: “_A new version of Firefox is available_”. The mozilla team have 4 differents release channels Nightly, Aurora, Beta and Release.

![](https://cdn-images-1.medium.com/max/768/1*RcEF7S4E_Mqguh4RO1j4KA.jpeg)<figcaption>The release workflow for Firefox <a href="https://twitter.com/fosdem">@FOSDEM</a></figcaption>

The mozilla team have a routine: every Tuesday at 3pm it’s release day! Builds are deployed in release channel for millions of users.

Maybe we can follow this weekly routine? The last version is released in production every x week, and we have 2 differents channels for developement and quality insurance.

Fun part: the worflow for testing your standalone app is different on the 2 platforms.

![](https://cdn-images-1.medium.com/max/1024/1*WgtWk4GnmnUU_USYv8A4Gg.jpeg)<figcaption>iOS and android are 2 differents worlds</figcaption>

#### How to onboard testers for iOS

1. Add fullname and Apple ID on [https://appstoreconnect.apple.com/](https://appstoreconnect.apple.com/)  
**Apple store connect** \> **Users and Roles**
2. [Download Testflight](https://itunes.apple.com/gb/app/testflight/id899247664?mt=8)

#### How to onboard testers for Android

1. Add fullname and Google play account on [https://play.google.com/apps/publish/](https://play.google.com/apps/publish)  
**Google Play Console** \> **Manage testers** \> **Create list**

It’s your lucky day rookie, you didn’t have problems with updates of npm packages, screenshot issues on the app store or release notes.

Your app is deployed. Remember the lesson of the day:

> Deploying an app to the store takes–at leat–one day

**Notes:** You can use [Over the Air Updates](https://docs.expo.io/versions/latest/workflow/glossary-of-terms#over-the-air-updates) to bypass the validations in the stores and speed up the deploy deploy. But you have some limitations.

I hope this motivates you to start building the perfect workflow for releasing your React Native app. Just drop me a message if you have any questions — I would be glad to help you!