> ## Documentation Index
> Fetch the complete documentation index at: https://docs.autosana.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Building Your Mobile App for Our Cloud

> Step-by-step guide to building your mobile app for our virtual device cloud

<Info>
  **Testing a website?** You don't need to build anything - just enter your URL when creating an app. This guide is for mobile apps (iOS and Android) only.
</Info>

<Tip>
  Add our [MCP Server](/mcp-setup) to help you build your app for our cloud.
</Tip>

## Build Requirements

Autosana runs your mobile apps on our virtual device cloud using **iOS Simulators** and **Android Emulators**. Your builds must meet these requirements:

### iOS Builds

* **Format**: `.app` file (compressed as `.zip`)
* **Architecture**: `arm64` (for Apple Silicon simulators)

<Tip>
  Building on an M1+ Mac will use `arm64` by default. Intel Macs will produce `x86_64` builds, which won't work on our simulators.
</Tip>

### Android Builds

* **Format**: `.apk` file
* **Architecture**: must include `x86_64` — either a universal APK (recommended) or an `x86_64`-only APK.

<Tip>
  Most build commands create universal APKs that include all architectures by default, so you typically don't need to configure the build architecture manually.
</Tip>

***

Select your framework to see build instructions:

<Tabs>
  <Tab title="React Native" icon="react">
    <Warning>
      **Important:** React Native apps must be built in Release mode. Debug builds will attempt to connect to Metro bundler and fail to run on the device. Release builds bundle the JavaScript code directly into the app, making them standalone.
    </Warning>

    ## React Native (iOS)

    1. Build it with:

    ```bash theme={null}
    npx react-native run-ios --mode Release
    ```

    2. App file should be here:

    ```bash theme={null}
    ios/build/Build/Products/Release-iphonesimulator/[YourApp].app
    ```

    <Note>
      In macOS, it should just be `YourApp` because macOS hides `.app` extensions
    </Note>

    3. Go to Finder, compress `YourApp` to a `.zip` and upload/drag it into the Autosana app upload dialog

    ### React Native with Expo (iOS)

    For Expo projects, use EAS Build to create simulator builds:

    1. Add this profile to your `eas.json`:

    ```json theme={null}
    {
      "build": {
        "preview-simulator": {
          "distribution": "internal",
          "ios": {
            "simulator": true
          }
        }
      }
    }
    ```

    2. Run the build command:

    ```bash theme={null}
    eas build --platform ios --profile preview-simulator
    ```

    3. Once the build completes, EAS will provide a download URL for the build
    4. Download and extract it to get the `.app` file
    5. Compress the `.app` to a `.zip` and upload it to Autosana

    ## React Native (Android)

    1. Navigate to your Android directory and build the release APK:

    ```bash theme={null}
    cd android && ./gradlew assembleRelease
    ```

    2. The APK will be located at:

    ```bash theme={null}
    android/app/build/outputs/apk/release/app-release.apk
    ```

    3. Upload the `.apk` file to Autosana

    ### React Native with Expo (Android)

    For Expo projects, use EAS Build to create APK builds:

    1. Add this profile to your `eas.json`:

    ```json theme={null}
    {
      "build": {
        "preview": {
          "distribution": "internal",
          "channel": "preview",
          "android": {
            "buildType": "apk"
          }
        }
      }
    }
    ```

    2. Run the build command:

    ```bash theme={null}
    eas build --platform android --profile preview
    ```

    3. Once the build completes, EAS will provide a download URL for the `.apk` file
    4. Download the APK and upload it to Autosana
  </Tab>

  <Tab title="Flutter" icon="mobile">
    ## Flutter (iOS)

    <Warning>
      We use .app files for simulator builds, not IPA files (which are for production devices)
    </Warning>

    1. Build the app for simulator:

    ```bash theme={null}
    flutter build ios --simulator
    ```

    If your app uses flavors, add the `--flavor` flag:

    ```bash theme={null}
    flutter build ios --simulator --flavor [flavorName]
    ```

    2. The `.app` file will be located at:

    ```bash theme={null}
    build/ios/iphonesimulator/Runner.app
    ```

    3. Compress the `.app` to a `.zip` file
    4. Drag or upload the `.zip` file into the Autosana app upload dialog

    ## Flutter (Android)

    1. Build apk in debug mode:

    ```bash theme={null}
    flutter build apk --debug
    ```

    If your app uses flavors, add the `--flavor` flag:

    ```bash theme={null}
    flutter build apk --debug --flavor [flavorName]
    ```

    2. File is located at:

    ```bash theme={null}
    build/app/outputs/flutter-apk/app-debug.apk
    ```

    3. Drag or upload the `.apk` file into the Autosana app upload dialog
  </Tab>

  <Tab title="Native iOS" icon="apple">
    ## Native iOS (Xcode/SwiftUI)

    ### Option 1: Using Xcode (Graphical Interface)

    1. Open your project in Xcode
    2. At the top of Xcode, set:
       * The scheme to your app target (e.g., "MyApp")
       * The device to a simulator (e.g., "iPhone 16 Pro")
    3. In Xcode menu, select **Product > Scheme > Edit Scheme**
    4. Under **Run**, change **Build Configuration** to **Release**
    5. Press **Command + B** to build the project
    6. After the build finishes, the `.app` file will be located at:

    ```bash theme={null}
    ~/Library/Developer/Xcode/DerivedData/<ProjectName>/Build/Products/Release-iphonesimulator/<AppName>.app
    ```

    7. Right click and open in Finder
    8. Right click and compress it to make a `.zip` file
    9. Drag or upload the `.zip` file into the Autosana app upload dialog

    <Tip>
      **Finding the build folder in Finder:**

      * Open Finder
      * Press **Command + Shift + G**
      * Paste the path and press Enter
    </Tip>

    ### Option 2: Using Terminal (Command Line)

    1. Open Terminal and navigate to the root of your Xcode project:

    ```bash theme={null}
    cd /path/to/your/project
    ```

    2. Run this command to build the Release version for simulator:

    ```bash theme={null}
    xcodebuild -scheme YourAppScheme \
      -sdk iphonesimulator \
      -configuration Release \
      -destination 'platform=iOS Simulator,OS=latest,name=iPhone 16 Pro' \
      -derivedDataPath ./build \
      ARCHS=arm64 \
      ONLY_ACTIVE_ARCH=NO \
      CODE_SIGN_IDENTITY="" \
      CODE_SIGNING_REQUIRED=NO \
      CODE_SIGNING_ALLOWED=NO \
      build
    ```

    3. After the build completes, your `.app` file will be located:

    ```bash theme={null}
    ./build/Build/Products/Release-iphonesimulator/YourAppName.app
    ```

    4. Right click and open in Finder
    5. Right click and compress it to make a `.zip` file
    6. Drag or upload the `.zip` file into the Autosana app upload dialog

    <Note>
      **Why Release configuration?** Release builds provide production parity with optimizations enabled, matching what your users experience. Simulator builds don't require code signing, so Release configuration works without additional setup. While Debug builds will work, they're not recommended for testing as they don't reflect the production environment.
    </Note>
  </Tab>

  <Tab title="Native Android" icon="android">
    ## Native Android (Kotlin/Java)

    ### Option 1: Debug Build (Recommended for Quick Testing)

    Debug builds work immediately without any signing configuration.

    **Using Android Studio:**

    1. Open your project in Android Studio
    2. From the menu bar, select **Build > Build Bundle(s) / APK(s) > Build APK(s)**
    3. Wait for the build to complete
    4. Click on **locate** in the notification that appears, or navigate to:

    ```bash theme={null}
    app/build/outputs/apk/debug/app-debug.apk
    ```

    5. Upload the `.apk` file to Autosana

    **Using Terminal:**

    ```bash theme={null}
    cd /path/to/your/android/project
    ./gradlew assembleDebug
    ```

    APK location: `app/build/outputs/apk/debug/app-debug.apk`

    ### Option 2: Release Build (Production Parity)

    Release builds provide better production parity but require signing configuration.

    **Step 1: Configure Signing (if not already set up)**

    Add this to your `app/build.gradle`:

    ```gradle theme={null}
    android {
        buildTypes {
            release {
                // Use debug keystore for testing (not for Play Store)
                signingConfig signingConfigs.debug
                minifyEnabled false
            }
        }
    }
    ```

    <Note>
      This uses the debug keystore for convenience. For Play Store releases, you'll need a proper release keystore.
    </Note>

    **Step 2: Build the Release APK**

    **Using Terminal:**

    ```bash theme={null}
    cd /path/to/your/android/project
    ./gradlew assembleRelease
    ```

    APK location: `app/build/outputs/apk/release/app-release.apk`

    **Using Android Studio:**

    1. Open your project in Android Studio
    2. From the menu bar, select **Build > Select Build Variant**
    3. Change from "debug" to "release"
    4. Select **Build > Build Bundle(s) / APK(s) > Build APK(s)**

    <Tip>
      **Which should I use?**

      * **Debug**: Faster builds, works immediately, easier debugging
      * **Release**: Production-like optimizations, catches minification issues
    </Tip>
  </Tab>
</Tabs>
