Google Play Store Deployment Guide

This guide will walk you through the complete process of deploying your React Native application to the Google Play Store. We’ll cover everything from initial setup to publishing your app.

Prerequisites

Before starting the deployment process, ensure you have:

  • A Google Play Developer account (requires a one-time fee of $25)
  • A keystore file for app signing (we’ll explain how to create this)
  • A privacy policy URL (required for all apps on the Play Store)
  • Your React Native app ready for production

Detailed Deployment Process

1. Google Play Console Setup

First, you’ll need to set up your app in the Google Play Console:

  1. Sign in to the Google Play Console
  2. Click “Create app” and provide your app’s basic information:
    • App name
    • Default language
    • App or game classification
    • Free or paid status
  3. Complete the store listing with:
    • Short and full descriptions
    • Screenshots and feature graphics
    • App icon (512x512 PNG)
    • Category selection
  4. Set up your content rating by completing the rating questionnaire
  5. Configure your app’s price and distribution settings

2. App Signing and Keystore Management

The keystore is a crucial security element that proves you’re the legitimate owner of your app. Without it, you cannot update your app on the Play Store.

Creating a Keystore

Use the following command to generate your keystore:

keytool -genkey -v -keystore your-app-name.keystore \
    -alias your-key-alias \
    -keyalg RSA \
    -keysize 2048 \
    -validity 10000

Let’s break down this command:

  • keytool: Java’s built-in key and certificate management tool
  • -genkey: Generates a new key pair
  • -keystore: Specifies the keystore filename
  • -alias: A unique identifier for your key
  • -keyalg RSA: Uses RSA algorithm for key generation
  • -keysize 2048: Sets key length to 2048 bits (industry standard)
  • -validity 10000: Key will be valid for 10000 days (approximately 27 years)

Configuring Your Keystore

Add your keystore configuration to android/app/build.gradle:

android {
    signingConfigs {
        release {
            storeFile file("your-app-name.keystore")
            storePassword System.getenv("KEYSTORE_PASSWORD")
            keyAlias System.getenv("KEY_ALIAS")
            keyPassword System.getenv("KEY_PASSWORD")
        }
    }
    buildTypes {
        release {
            signingConfig signingConfigs.release
        }
    }
}

For security, we recommend using environment variables instead of hardcoding credentials.

3. Building Your Release

You have two options for creating your release build:

yarn android:release

This command generates an .aab (Android App Bundle) file in android/app/build/outputs/bundle/release/. App Bundles are Google’s recommended format because they:

  • Reduce app size for users
  • Allow dynamic delivery of features
  • Optimize the app for different devices

Option 2: APK File

yarn android:apk

This creates a traditional .apk file in android/app/build/outputs/apk/release/. While APKs are still supported, they don’t offer the same optimization benefits as App Bundles.

4. Automated Deployment with Fastlane

Fastlane can automate your deployment process. Here’s how to use it:

# Install Fastlane
gem install fastlane

# Generate release build
cd android
bundle exec fastlane build_release

# Upload to Play Store
bundle exec fastlane deploy_internal

These commands:

  1. Build your app in release mode
  2. Handle signing with your keystore
  3. Upload the build to the Play Store’s internal testing track

5. Release Management Strategy

We recommend following this phased release approach:

  1. Internal Testing

    • Limited to specific Google Groups
    • Quick turnaround for testing
    • Immediate updates (no review process)
  2. Closed Testing

    • Private group of testers
    • Requires manual tester management
    • Good for beta testing
  3. Open Testing

    • Available to all Play Store users
    • Helps gather feedback at scale
    • Appears on Play Store as “Early Access”
  4. Production Release

    • Full public release
    • Can be rolled out gradually (percentage-based)
    • Monitored through Play Console analytics

Best Practices and Tips

  • Keystore Security

    • Store your keystore file securely (never in version control)
    • Keep multiple backups in secure locations
    • Document your keystore passwords securely
    • Consider using a password manager for team access
  • Version Management

    • Increment versionCode for each release
    • Use semantic versioning for versionName
    • Document all version changes
  • Testing

    • Test your release build thoroughly before uploading
    • Verify all app functionality works with production APIs
    • Test on multiple device types and Android versions
  • Monitoring

    • Set up crash reporting
    • Monitor Play Console metrics
    • Track user feedback and reviews

Remember to regularly check the Play Console Policy Center for any policy updates that might affect your app.