> ## 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

# 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

### 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">
    Transfer to Android device and install
  </Step>
</Steps>

<Note>
  APKs can be shared with testers directly without going through the Play Store.
</Note>

### AAB Build (Play Store)

For Google Play Store submission, you need to have Google Developer account (\$25/lifetime):

<Steps>
  <Step title="Select AAB">
    Choose "Build AAB" in the Deploy modal
  </Step>

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

  <Step title="Build">
    Wait for the AAB to compile
  </Step>

  <Step title="Download & Upload">
    Download AAB and upload to Google Play Console
  </Step>
</Steps>

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

## 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="/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](/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="/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
    * Verify version code is higher than previous
    * Review Gradle/dependency errors in logs
  </Accordion>

  <Accordion title="Generic Errors">
    * Try building again (transient issues)
    * Clear build cache if available
    * Contact support via Discord
  </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="GitHub Integration" icon="github" href="/integrations/github">
    Set up code syncing with GitHub
  </Card>

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

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