# Build Variants & Code Signing

> Understand debug vs release builds, environments and flavors, and how Android keystores and Apple certificates and provisioning profiles prove who built an...

Canonical: https://www.internhack.in/roadmaps/tracks/mobile/builds-and-signing
Last updated: 2026-11-28

Understand debug vs release builds, environments and flavors, and how Android keystores and Apple certificates and provisioning profiles prove who built an app.

Intermediate · about 5 hours · difficulty 3/5

Learn first: [The Expo Workflow: Dev Builds, Config & Environments](https://www.internhack.in/roadmaps/tracks/mobile/expo-workflow), [Git & Version Control for App Projects](https://www.internhack.in/roadmaps/tracks/mobile/git)

Before an app reaches a store it must be built in **release** mode and **signed**. Signing is how Android and iOS know an update really comes from you, and losing or mishandling keys is one of the most painful mistakes in mobile.

### Build types and environments

- **Debug** builds include dev tools and connect to a dev server; **release** builds are optimised, minified and what users get.
- Most teams need **environments** (development, staging, production) with different API URLs, app names and icons so they can be installed side by side. Use Android **product flavors**, Xcode **schemes and configurations**, Flutter `--flavor` and `--dart-define`, or Expo `app.config.ts` reading an environment variable.
- Bump **versionName/versionCode** (Android) and **CFBundleShortVersionString/CFBundleVersion** (iOS) for each upload; build numbers must always increase.

### Android signing

You sign with a private key in a **keystore**. With **Play App Signing**, Google keeps the app signing key and you upload builds with a separate **upload key** that can be reset if lost. Never commit keystores or passwords to Git.

### iOS signing

Apple requires a paid developer account. The pieces are:

- a **certificate** (development or distribution) tied to a private key,
- an **App ID** (bundle identifier) with capabilities like push,
- a **provisioning profile** linking certificate, app id and (for development) devices.

Xcode's automatic signing handles this for solo developers. Teams use **EAS credentials** or **Fastlane match** to share them safely.

### Managed option

**EAS Build** can generate and store keystores, certificates and profiles for you, then build in the cloud with `eas build --platform all --profile production`.

**Good enough to move on:** you can produce a signed release build for each platform, install staging and production side by side, and explain where your signing keys are stored.

## Key concepts

- **Debug vs release builds**
- **Environments, flavors and schemes**
- **Version names and build numbers**
- **Android keystores and Play App Signing**
- **Apple certificates and provisioning profiles**
- **EAS Build and credentials**: React Native
- **Fastlane match**

## Mini project

Set up staging and production variants of an app with different names, icons and API URLs, and produce a signed release build of each for Android and iOS.

## Check yourself

What happens if you lose your Android signing key without Play App Signing, and how does Play App Signing change that?

## Free resources

- [Expo: EAS Build](https://docs.expo.dev/build/introduction/) (Expo)
- [Android: Sign your app](https://developer.android.com/studio/publish/app-signing) (Android Developers)
- [Apple: Code signing](https://developer.apple.com/support/code-signing/) (Apple)

Previous: [Mobile App Security with OWASP MASVS](https://www.internhack.in/roadmaps/tracks/mobile/app-security-masvs) · Next: [Mobile CI/CD with EAS, Fastlane & Codemagic](https://www.internhack.in/roadmaps/tracks/mobile/mobile-ci-cd)

## More in Builds, CI/CD & Store Publishing

- [Build Variants & Code Signing](https://www.internhack.in/roadmaps/tracks/mobile/builds-and-signing)
- [Mobile CI/CD with EAS, Fastlane & Codemagic](https://www.internhack.in/roadmaps/tracks/mobile/mobile-ci-cd)
- [Beta Testing & Internal Distribution](https://www.internhack.in/roadmaps/tracks/mobile/beta-distribution)
- [Publishing to Google Play & the App Store](https://www.internhack.in/roadmaps/tracks/mobile/store-publishing)
- [Over-the-Air Updates](https://www.internhack.in/roadmaps/tracks/mobile/ota-updates)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Mobile App Developer Roadmap](https://www.internhack.in/roadmaps/tracks/mobile)
