Deployment: Mobile with EAS
Relevant source files
The following files were used as context for generating this wiki page:
The ElmecV2 project utilizes Expo Application Services (EAS) for building and submitting the native mobile applications for iOS and Android. EAS provides a cloud-based infrastructure to compile the React Native codebase into distributable binaries (.ipa for iOS, .apk/.aab for Android) and manage their submission to the respective app stores. This process is defined through configuration files and executed via the EAS CLI.
This document outlines the configuration, workflow, and essential components for mobile deployment using EAS within the project. For web deployment, refer to the Deployment: Web with Netlify page.
Sources: README.md:12, 126-131
EAS Project Configuration
The core of the EAS configuration resides in eas.json and environment variables. The project is identified within EAS services by a unique project ID.
EAS Project ID
The project is linked to an EAS project via a specific ID, which must be configured as an environment variable.
| Variable | Value | Purpose |
|---|---|---|
EXPO_PUBLIC_EAS_PROJECT_ID | elmec-mobile-app-demo | Identifies the project on Expo's services for builds and updates. |
This variable is crucial for both EAS builds and Netlify web deployments, ensuring consistent project identification across platforms.
Sources: DEPLOY-NETLIFY.md:39-40, 57-58, STATUS-DEPLOY.md:50, NETLIFY-DASHBOARD-SETUP.md:60-61
eas.json Configuration
This file defines the behavior of the EAS CLI, specifying build profiles and submission settings. The project does not contain an eas.json file in the provided context, but the README.md implies its usage. A typical structure would define build profiles. The README.md also mentions the EAS_PROJECT_ID in the .env example, which is related to this configuration.
Sources: README.md:86-87
Application Manifest (app.json)
The app.json file serves as the primary manifest for the Expo project, containing metadata and configuration for the native mobile apps.
Key app.json Properties
| Property Path | Description |
|---|---|
expo.name | The display name of the app on the device's home screen. |
expo.slug | The URL-friendly name for the app in Expo services. |
expo.version | The current version of the application. |
expo.orientation | The default screen orientation. |
expo.icon | Path to the app's home screen icon. |
expo.splash | Configuration for the app's splash screen. |
expo.updates.url | URL for over-the-air (OTA) updates. |
expo.ios | iOS-specific configuration, such as bundleIdentifier. |
expo.android | Android-specific configuration, such as package name and adaptiveIcon. |
expo.plugins | Defines plugins for extending native capabilities, such as expo-router. |
The expo-router plugin is configured with an origin URL, which is critical for enabling deep linking and universal links, particularly for the web version deployed on Netlify.
{
"expo": {
"plugins": [
[
"expo-router",
{
"origin": "https://tu-url-real.netlify.app/"
}
]
]
}
}
This configuration needs to be updated with the final production URL from Netlify to ensure proper routing.
Sources: app.json, DEPLOY-NETLIFY.md:104-116, NETLIFY-DASHBOARD-SETUP.md:143-152
Build and Submission Workflow
The process of building and submitting the mobile apps is handled by the EAS CLI, using commands defined in package.json and documented in the README.md.
This diagram illustrates the mobile deployment flow using EAS.
Sources: README.md:126-131
Key Commands
The deployment process is initiated using two main commands from the EAS CLI.
| Command | Description |
|---|---|
eas build --platform all | Initiates a cloud build for both iOS and Android platforms. This command uploads the project to EAS servers, where the native binaries are compiled. |
eas submit --platform all | Submits the completed builds from EAS to the Apple App Store and Google Play Store for review and release. |
These commands are typically run from the developer's local machine or a CI/CD pipeline.
Sources: README.md:127-130
Conclusion
The mobile deployment strategy for ElmecV2 is centered around Expo Application Services (EAS). By leveraging eas.json for build configuration, app.json for application metadata, and the EAS CLI for executing builds and submissions, the project maintains a streamlined and cloud-based workflow for releasing native iOS and Android applications. Proper configuration of the EAS_PROJECT_ID and the origin URL in app.json are critical for ensuring the app functions correctly with backend services and web-based routing.