DEV Community

Cover image for React Native- that's all #2
Maja
Maja

Posted on

React Native- that's all #2

📃ARTICLE #2 Deploy an app with EAS and Google Play Console

When you create a website or web application, you usually deploy it on a remote server or cloud. That's what happens with mobile apps, too! You use Google Play, App Store, Mi store etc. to publish and manage your mobile apps. All these platforms are neither Saas nor PaaS but central hub for all your mobile apps. Google Play is only for Android OS, App store is only for iOS but Mi store and AppGallery even tough they both come from Android OS phones are official app stores only for Xiaomi and Huawei.
In this second article I'm gonna teach you what Google Play Console is and how you can deploy your mobile app using Expo's EAS.
I wrote about Expo in my first ARTICLE#1 so don't forget to read it ❗

🏁 Let's get started!

Image description
This is how a typical Google Play Console dashboard looks like. There are currently two apps (the second one is only a draft so we'll ignore it 😁) under the closed testing.

Let's explore lifecycles of an app on a Google Play Console:

📱 1. Add an app
You add a new app in Google Play Console and choose a unique package name which cannot be changed later. Then you fill in basic info like app name, is it free or paid etc.

✍️ 2. App Configuration
This is the preparation phase before testing and publishing where you'll need to configure:

  • Title, short and full descriptions

  • Add screenshots and icon

  • Define a category

  • Your contact details

  • Add a Privacy policy file or URL

  • What is your target audience

  • Sign an Ads declaration

and so on 🥱

🛠️ 3. Build & Upload
Create and upload a signed release APK or AAB (which is preferred).

🧪 4. Testing
There are few types:

  • Internal testing: For a small group (<= 100 testers)

  • Closed testing: For a larger group (>= 12 testers for 14 days). As you can see my both apps are still at closed testing phase waiting to be fully tested by minimum 12 testers within 14 days.

  • Open testing: Public access

✅ 5. Production
Production is where you make your app available to billions of users on Google Play. Before you can apply for production access, you need to run a closed test which meets Google Play's criteria. When you apply, you'll also need to answer some questions about your closed test.

🚀 6. Your app is live
App becomes available in the countries you previously selected.

🔄 7. Post-Launch Maintenance
Upload new AAB versions if needed, fix bugs, add features, improve performance, respond to user feedback.

🔚 8. Unpublishing or Retiring
You can also unpublish the app which removes it from store, but current users can still have it.

Development vs Testing vs Deployment vs Production

🛠️ Development environment is where devs write code, build applications, use local databases, debug and so on.
🧪 Testing environment is where testers or QA teams verify the app for bugs, logic errors, or security issues.
🚚 Deployment is the process of moving code from one environment to another (from dev to testing or to production).
🌍 Production is a live version of the app used by real users.

Deployment using EAS
EAS is a very useful service that helps you build, develop, and deploy React Native apps. It provides a CLI (command line interface) tool to trigger builds in the cloud. It helps devs by removing major pain points of React Native app development by automatically generating a key store for Android, creating provisioning profiles for iOS, and performing many other tasks. The EAS makes the process fully automatic which can be completed within a minute as compared to manual work that takes so much time. 😫

Moving from Expo project to EAS development build (short explanation)

Before building an app and adding an app bundle (AAB) to Google Play Console we can generate android and/or ios folders with its native code within project using a simple command: npx expo prebuild. This step is optional but good to know 😊.
Using a command npx eas build we'll first answer some questions and generate an AAB file which will be ready to be added to GP Console. But, where we can find this file? Answer is on the Expo's dashboard page which looks like this:

Image description
My build artifact with AAB file expired because I built it long time ago ⏰.

We should download existing AAB file and follow the instructions on the GP Console website after creating a developer account.

📃 AAB vs APK
AAB (Android App Bundle) and APK (Android Package) are both file formats for distributing android apps, but they differ in their purpose and how they are used. APK is the traditional format for installing apps and AAB is a newer, optimized format used for publishing to Google Play Console.

👏The good thing is that EAS CLI can do the magic for us using npx eas submit command that uses Expo's Google Play Console API for submitting the app's AAB file to Console and setting it up for a specific track (internal or closed).

Now when you're familiar with different deployment stages of an app and how to deploy it, you are ready to start creating a real app which we will do it together in the next article.

📱 ARTICLE #3- ‘DoorDelivery’ application development

❗️NOTICE: ‘DoorDelivery’ application stack will be:

  • React Native with Expo
  • Express and MongoDB
  • Expo SDK for maps and geolocation tracking + Google Maps API

❓ Why Express and MongoDB
I usually work with .NET as my backend solution and MSSQL for database but this is a beginner-friendly tutorial and guidance so I don’t want to complicate things.
❓ Why geolocation and Google Maps
I want to show you how to communicate with native APIs and use Expo SDKs in a more interesting way

See you soon! 🎉

Top comments (0)