How to Create an iOS Build for Your React Native App with EAS

Photo by Lala Azizli on Unsplash

How to Create an iOS Build for Your React Native App with EAS

Table of contents

No heading

No headings in the article.

Are you ready to share your React Native masterpiece with the world? Creating an iOS build of your app is a crucial step towards making it available to a broader audience. In this blog post, we'll walk you through the process of creating an iOS build for your React Native app using Expo Application Services (EAS).

What is EAS?

Expo Application Services (EAS) is a set of services and tools that makes building, testing, and deploying React Native apps easier and faster. It simplifies the app development process, allowing you to focus on building features and user experiences.

Prerequisites

Before we dive into creating an iOS build with EAS, ensure you have the following prerequisites:

  1. A React Native app created using Expo.

  2. An Apple Developer Account.

  3. Node.js and npm installed on your computer.

  4. EAS CLI (Command-Line Interface) installed. You can install it globally using npm install -g eas-cli.

EAS Configuration

To create an iOS build with EAS, you need to configure your project using the eas.json file. Here's a sample eas.json file with the required iOS configuration:

{
  "submit": {
    "production": {
      "ios": {
        "appleId": "your_apple_id@example.com", // Your Appstore connect LOGIN EMAIL
        "ascAppId": "68937466363",   // Bundle identifier for your app, on your appstore connect, click app information, scroll down to find Apple ID
        "appleTeamId": "YOUR_APPLE_TEAM_ID"       // Your Apple Team ID, goto apple developer, click account scroll down to find team id
      }
    }
  }
}

Let's break down the key configurations:

  • appleId: This is your Apple ID, which is associated with your Apple Developer Account. Replace "your_apple_id@example.com" with your actual Apple ID.

  • ascAppId: The Application Services Connect (ASC) App ID is the unique identifier for your app on the Apple Developer Portal. Replace "com.yourcompany.yourapp" with your app's Bundle Identifier.

  • appleTeamId: Your Apple Team ID, which can be found on the Apple Developer Portal.

Creating an iOS Build

Now that your project is configured, you can proceed to create an iOS build. Open your terminal and run the following command:

eas submit --platform ios --latest

Let's break down this command:

  • eas submit: This command tells EAS to submit your project for building.

  • --platform ios: This flag specifies that you want to create an iOS build.

  • --latest: This flag indicates that you want to build the latest version of your app.

After running this command, EAS will start the building process. You'll see the progress in your terminal, and once the build is complete, EAS will provide you with a link to download the iOS build artifact.

Uploading to the App Store

With your iOS build ready, you can now upload it to the App Store. Here are the general steps:

  1. Log in to App Store Connect.

  2. Create a new app listing or choose an existing one.

  3. Navigate to "App Store Connect" and select "My Apps."

  4. Click on the app for which you want to upload the build.

  5. In the left sidebar, go to "TestFlight" under the "App Store" section.

  6. Click "iOS" and select "External Testing."

  7. Under "Builds," click the plus icon to add a new build.

  8. Follow the prompts to upload your iOS build. You'll need to provide version information, release notes, and other details.

  9. Once your build is uploaded, it will undergo Apple's review process. When approved, it will be available to external testers and eventually to the general public on the App Store.

And that's it! You've successfully created an iOS build for your React Native app using EAS and uploaded it to the App Store. Your app is now one step closer to reaching a global audience of iOS users. Congratulations!