---
description: Learn how to overwrite your native Android and iOS project configurations before building in Capawesome Cloud.
title: Overwrite Native Configurations - Capawesome
image: https://capawesome.io/docs/assets/images/social/cloud/native-builds/native-configurations.png
---

[ Skip to content](#overwrite-native-configurations) 

[ 🔐 Introducing the **Capacitor Vault** plugin — store secrets behind biometrics or a device passcode.](/blog/announcing-the-capacitor-vault-plugin/) 

* [  SDKs ](/docs/sdks/)
* [  Formbricks ](/docs/sdks/capacitor/formbricks/)
* [  Geocoder ](/docs/sdks/capacitor/geocoder/)
* [  Google Sign-In ](/docs/sdks/capacitor/google-sign-in/)
* [  Grafana Faro ](/docs/sdks/capacitor/grafana-faro/)
* [  libSQL ](/docs/sdks/capacitor/libsql/)
* [  Live Update ](/docs/sdks/capacitor/live-update/)
* [  Managed Configurations ](/docs/sdks/capacitor/managed-configurations/)
* [  Media Session ](/docs/sdks/capacitor/media-session/)
* [  ML Kit ](/docs/sdks/capacitor/mlkit/)
* [  Navigation Bar ](/docs/sdks/capacitor/navigation-bar/)
* [  NFC ](/docs/sdks/capacitor/nfc/)
* [  OAuth ](/docs/sdks/capacitor/oauth/)
* [  Pedometer ](/docs/sdks/capacitor/pedometer/)
* [  Photo Editor ](/docs/sdks/capacitor/photo-editor/)
* [  PostHog ](/docs/sdks/capacitor/posthog/)
* [  Printer ](/docs/sdks/capacitor/printer/)
* [  Purchases ](/docs/sdks/capacitor/purchases/)
* [  RealtimeKit ](/docs/sdks/capacitor/realtimekit/)
* [  Screen Orientation ](/docs/sdks/capacitor/screen-orientation/)
* [  Screenshot ](/docs/sdks/capacitor/screenshot/)
* [  Secure Preferences ](/docs/sdks/capacitor/secure-preferences/)
* [  Speech Recognition ](/docs/sdks/capacitor/speech-recognition/)
* [  Speech Synthesis ](/docs/sdks/capacitor/speech-synthesis/)
* [  Share Target ](/docs/sdks/capacitor/share-target/)
* [  Square Mobile Payments ](/docs/sdks/capacitor/square-mobile-payments/)
* [  SQLite ](/docs/sdks/capacitor/sqlite/)
* [  Superwall ](/docs/sdks/capacitor/superwall/)
* [  Torch ](/docs/sdks/capacitor/torch/)
* [  Vault ](/docs/sdks/capacitor/vault/)
* [  Wifi ](/docs/sdks/capacitor/wifi/)
* [  Zip ](/docs/sdks/capacitor/zip/)
* [  Cordova ](/docs/sdks/cordova/)
* [  Cloud ](/docs/cloud/)
* [  Integrations ](/docs/cloud/live-updates/integrations/)
* Concepts
* Reference
* [  Troubleshooting ](/docs/cloud/live-updates/troubleshooting/)
* [  FAQ ](/docs/cloud/live-updates/faq/)
* [  Native Builds ](/docs/cloud/native-builds/)
* [  Set Up Environments ](/docs/cloud/native-builds/environments/)
* Overwrite Native Configurations [  Overwrite Native Configurations ](/docs/cloud/native-builds/native-configurations/)
* [  Auto-Increment Build Numbers ](/docs/cloud/native-builds/auto-incrementing-build-numbers/)
* [  Configure the Web Build Script ](/docs/cloud/native-builds/web-build-script/)
* [  Build from a Monorepo ](/docs/cloud/native-builds/monorepo/)
* [  Use pnpm or Yarn ](/docs/cloud/native-builds/package-managers/)
* [  Install Private npm Packages ](/docs/cloud/native-builds/npm-private-registry/)
* [  Override the Java Version ](/docs/cloud/native-builds/override-java-version/)
* [  Custom iOS Provisioning Profiles ](/docs/cloud/native-builds/custom-ios-provisioning-profiles/)
* [  Build without Git ](/docs/cloud/native-builds/build-without-git/)
* [  Access Git Behind a Firewall ](/docs/cloud/native-builds/firewall-access/)
* [  Integrations ](/docs/cloud/native-builds/integrations/)
* Reference
* [  Troubleshooting ](/docs/cloud/native-builds/troubleshooting/)
* [  FAQ ](/docs/cloud/native-builds/faq/)
* [  App Store Publishing ](/docs/cloud/app-store-publishing/)
* [  Submit a Build ](/docs/cloud/app-store-publishing/submit-a-build/)
* [  Submit Automatically After a Build ](/docs/cloud/app-store-publishing/submit-automatically/)
* [  Troubleshooting ](/docs/cloud/app-store-publishing/troubleshooting/)
* [  FAQ ](/docs/cloud/app-store-publishing/faq/)
* [  Automations ](/docs/cloud/automations/)
* [  Reference ](/docs/cloud/automations/reference/)
* [  Troubleshooting ](/docs/cloud/automations/troubleshooting/)
* [  FAQ ](/docs/cloud/automations/faq/)
* [  Assist ](/docs/cloud/assist/)
* [  CLI ](/docs/cloud/cli/)
* APIs and SDKs
* [  Webhooks ](/docs/cloud/webhooks/)
* [  Integrations ](/docs/cloud/integrations/)
* Account
* [  Organization ](/docs/cloud/organizations/)
* [  Two-Factor Enforcement ](/docs/cloud/organizations/two-factor-authentication/)
* [  Audit Logs ](/docs/cloud/organizations/audit-logs/)
* [  Billing ](/docs/cloud/organizations/billing/)
* [  License Keys ](/docs/cloud/license-keys/)
* [  AI ](/docs/ai/)
* [  Insiders ](/docs/insiders/)
* [  Billing & Plans ](/docs/insiders/billing-and-plans/)
* [  FAQ ](/docs/insiders/faq/)
* [  License ](https://capawesome.io/legal/eula/)
* [  Support ](/docs/support/)
* [  Contributing ](/docs/contributing/)
* Contributing code
* [  Code of Conduct ](/docs/contributing/code-of-conduct/)
* [  Questions ](https://docs.github.com/en/discussions/collaborating-with-your-community-using-discussions/participating-in-a-discussion#creating-a-discussion)
* [  Blog ](/blog/)
* Categories

# Overwrite Native Configurations[¶](#overwrite-native-configurations "Permanent link")

You can automatically overwrite your native Android and iOS project configurations before building in [Capawesome Cloud](/). This is useful for modifying app identifiers, display names, version numbers, and other native configurations based on your build environment or branch.

This guide shows you how to use [Trapeze](https://trapeze.dev/), a mobile app configuration tool, to automate native project modifications during the build process.

## Installation[¶](#installation "Permanent link")

First, install Trapeze as a development dependency in your project:

`[](#%5F%5Fcodelineno-0-1)npm install --save-dev @trapezedev/configure
`

## Configuration File[¶](#configuration-file "Permanent link")

Create a configuration file named `capawesome.yml` in the root of your project. This file defines the native configurations you want to overwrite.

Here's a basic example that modifies the App ID and display name:

`[](#%5F%5Fcodelineno-1-1)platforms:
[](#%5F%5Fcodelineno-1-2)  android:
[](#%5F%5Fcodelineno-1-3)    packageName: com.example.myapp
[](#%5F%5Fcodelineno-1-4)    appName: My App
[](#%5F%5Fcodelineno-1-5)  ios:
[](#%5F%5Fcodelineno-1-6)    bundleId: com.example.myapp
[](#%5F%5Fcodelineno-1-7)    displayName: My App
`

Platform-specific configurations 

Trapeze uses platform-specific keys for similar configurations. For example, Android uses `packageName` while iOS uses `bundleId`. Refer to the [Android](https://trapeze.dev/docs/Operations/android) and [iOS](https://trapeze.dev/docs/Operations/ios) operation guides for complete lists of available configurations.

## Build Script[¶](#build-script "Permanent link")

Add an npm script to your `package.json` that runs Trapeze for Android and iOS platforms before the web build process:

`[](#%5F%5Fcodelineno-2-1){
[](#%5F%5Fcodelineno-2-2)  "scripts": {
[](#%5F%5Fcodelineno-2-3)    "capawesome:build": "if [ \"$CI_PLATFORM\" = \"ios\" ] || [ \"$CI_PLATFORM\" = \"android\" ]; then npx trapeze run capawesome.yml -y --$CI_PLATFORM; fi && npm run build"
[](#%5F%5Fcodelineno-2-4)  }
[](#%5F%5Fcodelineno-2-5)}
`

Capawesome Cloud automatically calls the [web build script](/docs/cloud/native-builds/web-build-script/) during the build process. The script conditionally runs Trapeze only for iOS and Android platforms using the `$CI_PLATFORM` environment variable.

## Using Environment Variables[¶](#using-environment-variables "Permanent link")

You can use Capawesome Cloud's [environment variables](/docs/cloud/native-builds/environments/) to dynamically configure your native projects. This is particularly useful for overwriting configurations based on your build environment.

### Define Variables[¶](#define-variables "Permanent link")

First, define variables in your configuration file:

`[](#%5F%5Fcodelineno-3-1)vars:
[](#%5F%5Fcodelineno-3-2)  APP_ID:
[](#%5F%5Fcodelineno-3-3)  APP_NAME:
[](#%5F%5Fcodelineno-3-4)
[](#%5F%5Fcodelineno-3-5)platforms:
[](#%5F%5Fcodelineno-3-6)  android:
[](#%5F%5Fcodelineno-3-7)    packageName: $APP_ID
[](#%5F%5Fcodelineno-3-8)    appName: $APP_NAME
[](#%5F%5Fcodelineno-3-9)  ios:
[](#%5F%5Fcodelineno-3-10)    bundleId: $APP_ID
[](#%5F%5Fcodelineno-3-11)    displayName: $APP_NAME
`

### Set Variable Values[¶](#set-variable-values "Permanent link")

Then, set the variable values in your Capawesome Cloud environment:

1. Navigate to the [Environments](https://console.cloud.capawesome.io/apps/%5F/environments) page
2. Select your environment or create a new one
3. Add variables with their values:
4. `APP_ID`: `com.example.myapp`
5. `APP_NAME`: `My App`

You can create multiple environments with different values (e.g., development, staging, production) and select the appropriate environment when triggering a build.

Default values 

You can provide default values for variables that will be used if no environment variable is set:

`[](#%5F%5Fcodelineno-4-1)vars:
[](#%5F%5Fcodelineno-4-2)  APP_ID:
[](#%5F%5Fcodelineno-4-3)    default: com.example.default
[](#%5F%5Fcodelineno-4-4)  APP_NAME:
[](#%5F%5Fcodelineno-4-5)    default: Default App Name
`

May 7, 2026 

 Back to top 