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

# App Deployment

> Deploy to iOS App Store and Google Play Store

<Warning>
  You're reading the docs for **Newly v1 (legacy)**, the classic newly.app builder. Using app.newly.app or Newly for Mac? Go to the [Newly v2 docs](/). Credits, pricing and features differ between the two.
</Warning>

# App Deployment

Newly handles the entire app deployment process, from building your app to submitting it to the App Store and Play Store.

## Deployment Options

<CardGroup cols={2}>
  <Card title="APK (Android)" icon="android">
    Android installable file for testing and side-loading
  </Card>

  <Card title="AAB (Android)" icon="google-play">
    Android App Bundle for Google Play Store submission
  </Card>

  <Card title="iOS Build" icon="apple">
    iOS build for App Store submission
  </Card>

  <Card title="Backend Deploy" icon="server">
    Push backend changes to production
  </Card>
</CardGroup>

## Building for Android

The Deploy modal offers four Android targets:

| Target         | Produces                                    | Use it for                                           |
| -------------- | ------------------------------------------- | ---------------------------------------------------- |
| **Simulator**  | A build for the in-browser Android emulator | Fast iteration while building                        |
| **APK**        | An installable `.apk` file                  | Sideloading onto a real device, sharing with testers |
| **AAB**        | A signed `.aab` bundle                      | Uploading to Google Play Console                     |
| **Play Store** | Store-readiness checks for a public release | Preparing a full public launch                       |

<Card title="Google Play Setup" icon="google-play" href="/legacy/guides/google-play-setup">
  Creating a Play Developer account, connecting Play Console, and choosing release tracks.
</Card>

### APK Build (Testing)

APK files let you install your app directly on Android devices:

<Steps>
  <Step title="Open Deploy Modal">
    Click **More** → **Deploy App** in the project header
  </Step>

  <Step title="Select APK">
    Choose "Build APK" option
  </Step>

  <Step title="Configure">
    Set your app name and icon if not already configured
  </Step>

  <Step title="Build">
    Click Build and wait for compilation (5-10 minutes)
  </Step>

  <Step title="Download">
    Download the APK file when ready
  </Step>

  <Step title="Install on your device">
    Transfer the `.apk` to your Android device (email, Drive, or a direct download link) and tap it.

    Android will ask you to **allow installs from this source** the first time — this is normal for any app not installed from the Play Store. Approve it in the prompt, or under **Settings → Apps → Special access → Install unknown apps**.

    You may also see a **Play Protect** warning saying the app wasn't recognized. Tap **More details → Install anyway**. It appears because the app hasn't been scanned by Google, not because anything is wrong with your build.
  </Step>
</Steps>

<Note>
  APKs can be shared with testers directly without going through the Play Store. APK builds don't require a signing key — only AAB builds do.
</Note>

<Warning>
  An `.aab` file **cannot be installed on a device**. It's a bundle Google Play processes to generate device-specific APKs, not an installable app. If you want to put a build on a phone yourself, use the **APK** target.
</Warning>

### AAB Build (Play Store)

Google Play requires an **Android App Bundle** (`.aab`), not an APK. You'll need a Google Play Developer account (\$25 one-time).

The AAB target is a **four-step wizard**:

<Steps>
  <Step title="Enter Bundle Identifier">
    Your package name, in the format `com.companyname.appname`.

    <Warning>
      Package names cannot be changed after your first Play Store submission. Choose carefully!
    </Warning>
  </Step>

  <Step title="Set App Version">
    Set the **version name** (e.g. `1.0.0`) and **version code** (an integer). Newly shows your last successful build and pre-fills the next version for you — a patch bump and a version code one higher.

    Every upload to Google Play needs a version code higher than the previous one, and codes can never be reused.
  </Step>

  <Step title="Generate & Download Your Signing Key">
    Newly generates the release key Google Play requires, then asks you to download two files — **`release-keystore.p12`** and **`keystore-credentials.txt`**. You cannot continue until both are saved.

    On later builds this step instead offers **Use Existing Key** (what you want) or **Generate New Key**.

    <Warning>
      Losing these files means you can never publish an update to your app. Back them up somewhere permanent — a password manager or encrypted backup, not just your Downloads folder. Full detail: [Android Signing Keys](/legacy/guides/android-signing-keys).
    </Warning>
  </Step>

  <Step title="Build">
    Newly builds and signs your app. When it finishes, download the `.aab` and upload it to [Google Play Console](https://play.google.com/console).
  </Step>
</Steps>

<Card title="Android Signing Keys" icon="key" href="/legacy/guides/android-signing-keys">
  What the signing key is, how to store it, and what to do if you lose it.
</Card>

## Building for iOS

iOS builds require an Apple Developer Account (\$99/year):

<Steps>
  <Step title="Apple Developer Account">
    Ensure you have an active [Apple Developer Account](https://developer.apple.com)
  </Step>

  <Step title="Select iOS Build">
    Choose "Build for iOS" in the Deploy modal
  </Step>

  <Step title="Expo Launch">
    * Migrate to Github
    * Make the Repo public
    * Copy the Repo link
    * Open Expo Launch and paste the Repo link
  </Step>

  <Step title="Enter Credentials ">
    Provide your Apple Developer credentials:

    * Apple ID
    * App-specific password (generate in Apple ID settings)
  </Step>

  <Step title="Configure App">
    * App name
    * Bundle identifier (e.g., `com.yourname.appname`)
    * Version number
  </Step>

  <Step title="Build & Submit">
    Newly builds and submits to App Store Connect
  </Step>
</Steps>

### Creating App-Specific Password

For iOS builds, you need an app-specific password:

1. Go to [appleid.apple.com](https://appleid.apple.com)
2. Sign in with your Apple ID
3. Navigate to Security → App-Specific Passwords
4. Click "Generate Password"
5. Name it "Newly" and save the generated password

### Apps That Need Special Entitlements

If your app uses a gated capability — Family Controls (Screen Time), Critical Alerts, CarPlay, clinical Health Records, or Android restricted permissions like background location — you must **apply for approval** before submitting, or the store will reject it.

<Card title="Permissions & Entitlements" icon="shield-check" href="/legacy/guides/permissions-and-entitlements">
  How to request entitlements from Apple and declare restricted permissions on Google Play.
</Card>

## App Configuration

Before building, configure your app settings:

### App Name & Icon

<Tabs>
  <Tab title="In Newly">
    1. Click **More** → **Project Settings**
    2. Update app name
    3. Upload app icon (1024x1024 recommended)
  </Tab>

  <Tab title="Via AI">
    ```
    Set the app name to "My Fitness Tracker" and use
    the icon I uploaded earlier for the app icon.
    ```
  </Tab>
</Tabs>

### App Icon Requirements

| Platform | Size      | Format                            |
| -------- | --------- | --------------------------------- |
| iOS      | 1024x1024 | PNG, no transparency              |
| Android  | 512x512   | PNG, with or without transparency |

<Tip>
  Use a simple, recognizable design that looks good at small sizes.
</Tip>

## Backend Deployment

If your app uses Liquid Backend:

<Steps>
  <Step title="Open Deploy Modal">
    Click **More** → **Deploy App**
  </Step>

  <Step title="Backend Section">
    Look for the "Backend" section in the modal
  </Step>

  <Step title="Push to Production">
    Click "Push to Production" to deploy backend changes
  </Step>

  <Step title="Verify">
    Production URL is shown when deployment completes
  </Step>
</Steps>

<Note>
  Deploying pushes your backend **code and schema** to production, not your dev data. Records created in dev stay in dev. See [Dev and production data](/legacy/features/backend#dev-and-production-data).
</Note>

<Warning>
  Deploy backend to production before submitting your app to stores. Your production app needs the production backend URL.
</Warning>

## GitHub Integration

Connect GitHub for automatic code sync:

1. Click **More** → **GitHub** in the burger menu
2. Authorize Newly to access GitHub
3. Create a new repository or select existing
4. Code syncs on each commit

Benefits:

* Full version control
* Collaborate with other developers
* Deploy to custom infrastructure
* Code backup and portability

<Card title="GitHub Integration" icon="github" href="/legacy/integrations/github">
  Learn more about GitHub setup
</Card>

## Testing Before Submission

Before submitting to app stores:

<AccordionGroup>
  <Accordion title="Test on Real Devices">
    * Download APK and test on Android phone
    * Use TestFlight for iOS testing
    * Try different screen sizes
  </Accordion>

  <Accordion title="Check All Features">
    * Test authentication flows
    * Verify data persistence
    * Check offline behavior
    * Test payments (if applicable)
  </Accordion>

  <Accordion title="Review App Store Guidelines">
    * [Apple App Store Guidelines](https://developer.apple.com/app-store/review/guidelines/)
    * [Google Play Policies](https://play.google.com/about/developer-content-policy/)
  </Accordion>
</AccordionGroup>

## App Store Submission Tips

### Apple App Store

* **Screenshots**: Required for each device size
* **Description**: Clear, accurate app description
* **Privacy Policy**: Required for all apps
* **Age Rating**: Answer questionnaire accurately
* **Review Notes**: Provide demo account if login required

### Google Play Store

* **Screenshots**: At least 2, up to 8
* **Feature Graphic**: 1024x500 banner image
* **Privacy Policy**: Link required
* **Content Rating**: Complete questionnaire
* **Target Audience**: Specify correctly

## Troubleshooting Builds

### Build Fails

<AccordionGroup>
  <Accordion title="iOS Build Errors">
    * Verify Apple ID and password are correct
    * Check app-specific password is valid
    * Ensure bundle ID is unique
    * Review build logs for specific errors
  </Accordion>

  <Accordion title="Android Build Errors">
    * Check package name format (`com.companyname.appname`)
    * Verify the version code is higher than your previous upload — codes can never be reused
    * Review Gradle/dependency errors in the **Logs** panel → Build Logs. Paste the line containing `FAILED` or `error:` into the chat and the AI can usually fix it — see [Using logs to debug](/legacy/guides/using-logs-to-debug)
  </Accordion>

  <Accordion title="Play Console rejects the upload">
    * **"Not signed with the correct key"** — the build used a different signing key than your first release. Rebuild with **Use Existing Key** on step 3. See [Android Signing Keys](/legacy/guides/android-signing-keys)
    * **"Version code already used"** — bump the version code on step 2 and rebuild
    * **APK not accepted** — Play Store releases require an AAB, not an APK
  </Accordion>

  <Accordion title="Generic Errors">
    * Try building again (transient issues)
    * Clear build cache if available
    * Contact support via Discord
  </Accordion>

  <Accordion title="Let Newly fix the build for you">
    When an Android or iOS build fails, Newly analyzes the build log and offers a **one-click fix** in the chat panel — no digging through Gradle output. If the offer doesn't appear, open the **Logs** panel → Build Logs, copy the line containing `FAILED` or `error:`, and paste it into the chat with one line of context.
  </Accordion>
</AccordionGroup>

### App Rejection

If your app is rejected from stores:

1. Read the rejection reason carefully
2. Ask AI to help fix the issue
3. Rebuild and resubmit
4. Respond to reviewer if needed

Common rejection reasons:

* Crashes or bugs
* Incomplete functionality
* Misleading metadata
* Privacy policy issues
* Guideline violations

## Next Steps

<CardGroup cols={2}>
  <Card title="Android Signing Keys" icon="key" href="/legacy/guides/android-signing-keys">
    Generate and safeguard your Google Play release key
  </Card>

  <Card title="Google Play Setup" icon="google-play" href="/legacy/guides/google-play-setup">
    Play Developer account, Play Console connection, release tracks
  </Card>

  <Card title="GitHub Integration" icon="github" href="/legacy/integrations/github">
    Set up code syncing with GitHub
  </Card>

  <Card title="RevenueCat Payments" icon="credit-card" href="/legacy/integrations/revenuecat">
    Add in-app purchases and subscriptions
  </Card>

  <Card title="Permissions & Entitlements" icon="shield-check" href="/legacy/guides/permissions-and-entitlements">
    Apply for gated Apple entitlements and Android permissions
  </Card>
</CardGroup>
