Build & Publish
To launch your app to Apple App Store and Google Play Store, you need to follow these steps.
Before you start
If you’re a Windows or Linux user, you should be aware that building an iOS app requires a Mac or MacBook. This is because Xcode (Apple’s development environment) is necessary for iOS app development and is only available on macOS.
If you don’t have access to a Mac, consider using React2App CloudBuild , our cloud build service that builds your iOS app on remote macOS machines.
For Android app development, you can use Windows, Linux, or macOS without restrictions.
iOS
Step 1. Create an app at Apple App Store Connect
Sign in to Apple Developer Account
First, you need an Apple Developer account. If you don’t have one, register at developer.apple.com . The Apple Developer Program costs $99/year and gives you access to App Store distribution, TestFlight, and other Apple developer tools. Once registered, sign in to App Store Connect using your Apple ID credentials.
Create App & Fill Details in App Store Connect
- In App Store Connect, navigate to “My Apps” and click the ”+” button to create a new app.
- Select “New App” and fill in the required information:
- Platforms: iOS
- App Name: Your app’s name (as it will appear on the App Store)
- Primary Language: Your app’s primary language
- Bundle ID: Your app’s unique identifier (e.g., com.yourcompany.appname)
- SKU: A unique identifier for your own tracking
- Complete the App Information section with details like:
- Privacy Policy URL
- App category
- Content rights declaration
- Prepare your app’s metadata including:
- Screenshots (in various device sizes)
- App description
- Keywords
- Support URL
Step 2. Build .ipa
file
Install required tools
-
Xcode:
- Download and install the latest version from the Mac App Store. After installation:
- Open Xcode and accept the license agreement
- Set up your developer account in Xcode → Preferences → Accounts
-
Fastlane:
- Install via Terminal with:
brew install fastlane
- If you don’t have Homebrew, install it with the following command (It’s like an App store for CLI tools)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
For more information, see:
- Homebrew: brew.sh
- Fastlane: fastlane docs
-
Transporter:
- Download from the Mac App Store. This tool will be used to upload your app to App Store Connect.
Update react2app.config.js
Open your project’s react2app.config.js
file and update the iOS configuration with your app details:
module.exports = {
ios: {
displayName: "Your App Name",
appId: "com.yourcompany.appname", // Your app ID from App Store Connect
teamId: "XXXXXXXXXX", // Your Apple Developer Team ID
version: "1.0.0",
productionUrl: "https://your-website-url.com",
},
...
};
You can find your Team ID in the Apple Developer portal under Membership details.
Build .ipa
file
Run the following command in your project directory to build your iOS app:
npx react2app build ios
This will create an .ipa
file in the /react2app
directory of your project. The build process may take several minutes so relax and have some coffee.
Step 3. Test and submit
Upload .ipa file with Transporter
- Open the Transporter app on your Mac
- Sign in with your Apple ID (the same one used for your developer account)
- Click the ”+” button to add your
.ipa
file - Select the
.ipa
file from your project’s build directory - Click “Upload” to send your app to App Store Connect
Test with TestFlight
- In App Store Connect, navigate to your app → TestFlight
- Wait for Apple to complete the processing of your build (this can take up to an hour)
- Once processing is complete, you’ll need to provide test information:
- Add test notes for your testers
- Answer the export compliance questions
- Add internal testers (members of your team) or create external testing groups
- Send invitations to your testers via email
- Collect feedback and fix any issues before submitting to the App Store
Submit your app & Fix
- In App Store Connect, go to your app → App Store tab
- Complete all required metadata if you haven’t already:
- App information
- Pricing and availability
- App privacy information (privacy practices questionnaire)
- Version information
- Click “Submit for Review” when ready
- Monitor the review status in App Store Connect
- If Apple rejects your app, they’ll provide feedback on what needs to be fixed
- Make the necessary changes and resubmit your app
Common reasons for rejection include:
- Crashes and bugs
- Broken links
- Placeholder content
- Incomplete metadata
- Privacy concerns
- Non-compliance with Apple’s Human Interface Guidelines
Done 🎉
Once Apple approves your app, it will be available on the App Store according to your release schedule (immediate or manual). Congratulations on publishing your iOS app!
Android
Step 1. Create an app at Google Play Console
Sign in to Google Play Console
First, you need a Google Play Developer account. If you don’t have one, register at play.google.com/console . The Google Play Developer Program requires a one-time fee of $25. Once registered, sign in to the Google Play Console using your Google account credentials.
Create App & Fill Details
- In the Google Play Console, click on “Create app” to start a new app.
- Fill in the required information:
- App name: Your app’s name as it will appear on Google Play
- Default language: Your app’s primary language
- App or game: Select the appropriate category
- Free or paid: Choose your app’s pricing model
- Declarations: Complete the required declarations about your app
- Click “Create app” to proceed.
- Complete the Store Listing section with details like:
- Short description (up to 80 characters)
- Full description (up to 4000 characters)
- Screenshots (in various device sizes)
- Feature graphic (1024 x 500 px)
- App icon (512 x 512 px)
- Content rating questionnaire
- Privacy policy URL
Step 2. Build .aab
file
Install required tools
-
Android Studio: Download and install the latest version from developer.android.com . After installation:
- Open Android Studio and complete the setup wizard
- Install any recommended SDK components
-
Fastlane: Install via Terminal with:
# On macOS with Homebrew brew install fastlane # On Windows/Linux with Ruby gem install fastlane
Create Keystore and update Environment Variables
-
Generate a signing key using Android Studio:
- Go to Build > Generate Signed Bundle/APK
- Click “Create new…” to create a new keystore
- Fill in the required information and remember your keystore password
- Save the keystore file in a secure location
-
Set up environment variables for secure key storage:
- Create a
.env
file in your project root (make sure to add it to.gitignore
) - Add the following variables:
ANDROID_KEYSTORE_PATH=/path/to/your/keystore.jks ANDROID_KEYSTORE_PASSWORD=your_keystore_password ANDROID_KEY_ALIAS=your_key_alias ANDROID_KEY_PASSWORD=your_key_password
- Create a
Update react2app config with your app details
Open your project’s react2app.config.js
file and update the Android configuration:
module.exports = {
// ... existing config
android: {
applicationId: "com.yourcompany.appname", // Your app's package name
appName: "Your App Name",
version: "1.0.0",
versionCode: 1,
keystorePath: process.env.ANDROID_KEYSTORE_PATH,
keystorePassword: process.env.ANDROID_KEYSTORE_PASSWORD,
keyAlias: process.env.ANDROID_KEY_ALIAS,
keyPassword: process.env.ANDROID_KEY_PASSWORD,
// Additional Android-specific configurations
},
// ... rest of config
};
Build .aab file
Run the following command in your project directory to build your Android app:
npx react2app build android
This will create an .aab
(Android App Bundle) file in the build/android
directory of your project. The build process may take several minutes depending on your machine’s performance.
Step 3. Test and submit
Upload .aab file to Google Play Console
- In the Google Play Console, navigate to your app > Release > Production
- Click “Create new release”
- Upload the
.aab
file from your project’s build directory - Add release notes describing what’s new in this version
- Review the release and click “Start rollout to Production”
Test with Play Store
Before submitting your app for review, you can test it using Google Play’s testing tracks:
- In the Google Play Console, go to your app > Testing > Internal testing
- Create a new release and upload your
.aab
file - Add testers by email address or create a Google Group for testers
- Save and roll out the release to internal testing
- Testers will receive an email with instructions to download and test your app
- Collect feedback and fix any issues before submitting to production
Submit your app & Fix
- Ensure all required sections are complete:
- Store listing
- Content rating
- App content (target audience and content)
- Pricing & distribution
- App releases
- Submit your app for review by rolling out a production release
- Monitor the review status in the Google Play Console
- If Google rejects your app, they’ll provide feedback on what needs to be fixed
- Make the necessary changes and resubmit your app
Common reasons for rejection include:
- Policy violations
- Crashes and bugs
- Inadequate content rating
- Intellectual property issues
- Deceptive behavior or spam
- Poor performance on various devices
Done 🎉
Once Google approves your app, it will be available on the Google Play Store according to your release schedule (staged rollout or full release). Congratulations on publishing your Android app!