Build and deploy React Native applications to app stores with best practices.
Build and deploy React Native applications to app stores with best practices.
Learn to build and package React Native applications for Android platform including APK and AAB generation
Content by: Ronak Macwan
React Native Developer
Configure Android build environment, signing keys, and build variants for development and production releases.
Set up build.gradle files, ProGuard rules, and app signing for secure Android app distribution.
// android/app/build.gradle
android {
compileSdkVersion 33
buildToolsVersion "33.0.0"
defaultConfig {
applicationId "com.yourapp.reactnative"
minSdkVersion 21
targetSdkVersion 33
versionCode 1
versionName "1.0.0"
multiDexEnabled true
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
release {
if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
storeFile file(MYAPP_UPLOAD_STORE_FILE)
storePassword MYAPP_UPLOAD_STORE_PASSWORD
keyAlias MYAPP_UPLOAD_KEY_ALIAS
keyPassword MYAPP_UPLOAD_KEY_PASSWORD
}
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
signingConfig signingConfigs.release
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
shrinkResources true
}
}
bundle {
language {
enableSplit = true
}
density {
enableSplit = true
}
abi {
enableSplit = true
}
}
}
// gradle.properties
MYAPP_UPLOAD_STORE_FILE=my-upload-key.keystore
MYAPP_UPLOAD_KEY_ALIAS=my-key-alias
MYAPP_UPLOAD_STORE_PASSWORD=*****
MYAPP_UPLOAD_KEY_PASSWORD=*****
# Build commands
# Debug APK: ./gradlew assembleDebug
# Release APK: ./gradlew assembleRelease
# Release AAB: ./gradlew bundleReleaseTest your understanding of this topic:
Build and package React Native applications for iOS platform including IPA generation and App Store submission
Content by: Ronak Macwan
React Native Developer
Configure Xcode project settings, code signing, and provisioning profiles for iOS app distribution.
Prepare app metadata, screenshots, and App Store Connect configuration for iOS app submission.
// ios/YourApp/Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>Your App</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
// Build Script for iOS
#!/bin/bash
set -e
echo "๐ Starting iOS build process..."
# Clean previous builds
echo "๐งน Cleaning previous builds..."
xcodebuild clean -workspace ios/YourApp.xcworkspace -scheme YourApp
# Install dependencies
echo "๐ฆ Installing dependencies..."
cd ios && pod install && cd ..
# Build for release
echo "๐จ Building for release..."
xcodebuild archive \
-workspace ios/YourApp.xcworkspace \
-scheme YourApp \
-configuration Release \
-destination generic/platform=iOS \
-archivePath ios/build/YourApp-Release.xcarchive
# Export IPA
echo "๐ฑ Exporting IPA..."
xcodebuild -exportArchive \
-archivePath ios/build/YourApp-Release.xcarchive \
-exportPath ios/build/ \
-exportOptionsPlist ios/ExportOptions.plist
echo "โ
iOS build completed successfully!"Test your understanding of this topic:
Deploy React Native applications to Google Play Store and Apple App Store with proper store optimization
Content by: Ronak Macwan
React Native Developer
Upload and publish Android apps to Google Play Store with proper store listing optimization and release management.
Submit iOS apps to Apple App Store with proper review guidelines compliance and store optimization.
// App Store Connect Configuration
{
"app": {
"name": "Your React Native App",
"bundleId": "com.yourapp.reactnative",
"version": "1.0.0",
"buildNumber": "1",
"platforms": ["ios", "android"]
},
"storeListing": {
"title": "Your Amazing App",
"subtitle": "The best React Native app ever",
"description": "A comprehensive React Native application built with modern technologies...",
"keywords": ["react native", "mobile", "cross-platform", "javascript"],
"category": "Productivity",
"contentRating": "4+",
"screenshots": {
"iphone": [
"screenshot1.png",
"screenshot2.png",
"screenshot3.png"
],
"ipad": [
"ipad_screenshot1.png",
"ipad_screenshot2.png"
]
},
"appIcon": "app_icon_1024.png",
"privacyPolicy": "https://yourapp.com/privacy",
"supportUrl": "https://yourapp.com/support"
},
"pricing": {
"tier": "free",
"availability": "all_countries"
},
"review": {
"notes": "This is a React Native app with the following features...",
"contactInfo": {
"firstName": "John",
"lastName": "Doe",
"phone": "+1234567890",
"email": "john@yourapp.com"
}
}
}
// Fastlane Configuration
# Fastfile
default_platform(:ios)
platform :ios do
desc "Deploy to App Store"
lane :deploy do
# Increment build number
increment_build_number(xcodeproj: "ios/YourApp.xcodeproj")
# Build the app
build_app(
workspace: "ios/YourApp.xcworkspace",
scheme: "YourApp",
configuration: "Release"
)
# Upload to App Store Connect
upload_to_app_store(
force: true,
skip_metadata: false,
skip_screenshots: false
)
end
end
platform :android do
desc "Deploy to Google Play Store"
lane :deploy do
# Build the app
gradle(
task: "bundle",
build_type: "Release",
project_dir: "android"
)
# Upload to Google Play Store
upload_to_play_store(
track: "production",
aab: "android/app/build/outputs/bundle/release/app-release.aab"
)
end
endTest your understanding of this topic:
Complete guide to deploying React Native apps to Google Play Store with best practices and optimization
Content by: Ronak Macwan
React Native Developer
Optimize app store listings with compelling descriptions, screenshots, and keywords for better discoverability.
Manage app releases, updates, and rollouts with proper versioning and staged deployment strategies.
// Google Play Console Configuration
{
"appDetails": {
"packageName": "com.yourapp.reactnative",
"title": "Your React Native App",
"shortDescription": "Amazing cross-platform mobile app",
"fullDescription": "A comprehensive React Native application that provides...",
"category": "PRODUCTIVITY",
"contentRating": "EVERYONE",
"website": "https://yourapp.com",
"supportEmail": "support@yourapp.com",
"privacyPolicy": "https://yourapp.com/privacy"
},
"storeListing": {
"graphics": {
"appIcon": "app_icon_512.png",
"featureGraphic": "feature_graphic_1024x500.png",
"screenshots": [
"screenshot1.png",
"screenshot2.png",
"screenshot3.png",
"screenshot4.png"
]
},
"localization": {
"defaultLanguage": "en-US",
"supportedLanguages": ["en-US", "es-ES", "fr-FR", "de-DE"]
}
},
"pricing": {
"free": true,
"countries": "all"
},
"release": {
"track": "production",
"releaseType": "appBundle",
"rolloutPercentage": 100
}
}
// Android App Bundle Configuration
// android/app/build.gradle
android {
bundle {
language {
enableSplit = true
}
density {
enableSplit = true
}
abi {
enableSplit = true
}
}
}
// Play Store Upload Script
#!/bin/bash
echo "๐ Starting Play Store deployment..."
# Build the app bundle
echo "๐จ Building Android App Bundle..."
cd android
./gradlew bundleRelease
# Upload to Play Store using fastlane
echo "๐ฑ Uploading to Play Store..."
cd ..
fastlane android deploy
echo "โ
Play Store deployment completed!"Test your understanding of this topic:
Continue your learning journey and master the next set of concepts.
Continue to Module 12