> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# Set the app identity

Your app's name, ID, version and icon are options of the `build` target in `angular.json`. `ng build --platform` writes them into both apps:

```json title="angular.json"
"build": {
  "builder": "@blotch/angular-lynx-build:application",
  "options": {
    "appName": "My App",
    "appId": "com.example.myapp",
    "version": "1.2.0",
    "buildNumber": 42,
    "icon": "src/assets/icon.png",
    "orientation": "portrait"
  }
}
```

:::warning Replace the placeholder app ID
`ng add` sets `appId` to a placeholder, `com.example.<project>`. Replace it before your first upload. The stores identify your app by its [app ID](/guide/glossary.md#app-id), and it can't change afterwards.
:::

## The options

| Option        | Description                                                                                                                                  |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `appName`     | The name under the icon. `ng add` sets it to the project name                                                                                |
| `appId`       | The iOS bundle ID and Android application ID. Two or more dot-separated parts of letters and digits, each starting with a letter             |
| `version`     | The version users see, up to three numbers (`1.2.0`). Defaults to `package.json`'s version, or `1.0.0` while that's still `ng new`'s `0.0.0` |
| `buildNumber` | A whole number that must increase with every store upload. Defaults to `1`                                                                   |
| `icon`        | A 1024×1024 PNG without transparency. Both apps' icon is made from it: see [The app icon](#the-app-icon)                                     |
| `splash`      | What shows from the tap on the app's icon until its first screen is ready: an image on a color. See [The splash screen](#the-splash-screen)  |
| `orientation` | `portrait` (default), `landscape` or `all`                                                                                                   |

The same `options` hold the rest of the native settings:

- [Turn on device features](/guide/native-apps/device-features.md), such as Bluetooth or the calendar, and add links that open the app.
- [Permissions](/guide/native-apps/permissions.md): the reasons iOS shows when the app asks.
- [The build API](/api/build/index.md#native-app-options) lists every option.

## The app icon

`icon` is one 1024×1024 PNG without transparency. iOS uses it as it is. For Android, the build makes:

- the sizes each screen density needs
- a round copy, for the launchers that show round icons
- an [adaptive icon](https://developer.android.com/develop/ui/views/launch/icon_design_adaptive), for Android 8 and later

The launcher masks an adaptive icon to its own shape (a circle, a squircle...). So by default, the build scales your icon to fit inside the mask: like on iOS, only its corners are cut off.

### Two layers on Android

Adaptive icons have two layers that the launcher moves apart as the icon is touched. To use them, give the layers in `android.adaptiveIcon`:

```json title="angular.json"
"options": {
  "icon": "src/assets/icon.png",
  "android": {
    "adaptiveIcon": {
      "foreground": "src/assets/icon-foreground.png",
      "background": "#111111"
    }
  }
}
```

- `foreground` is a 1024×1024 PNG with transparency. The mask crops its edges: keep what matters inside the middle 66 of its 108 dp, about 626 px of the 1024.
- `background` is a color (`#RRGGBB` or `#RGB`) or a 1024×1024 PNG.

Android 7 still shows the flat icon made from `icon`, so set both. The 512×512 icon of your Google Play listing is uploaded in the Play Console, not built.

## The splash screen

The splash screen is what the phone shows from the tap on the app's icon until the app's first screen is ready. Give it your logo with `splash`:

```json title="angular.json"
"options": {
  "splash": {
    "image": "src/assets/splash.png",
    "imageWidth": 180,
    "backgroundColor": "#F4EFE6",
    "dark": {
      "image": "src/assets/splash-dark.png",
      "backgroundColor": "#0B1C24"
    }
  }
}
```

- **`image`** is a PNG with transparency, drawn in the middle of the screen. Without one, iOS shows the color alone, and Android the app's icon.
- **`imageWidth`** is how wide it's drawn, in points and dp. Its height follows from its shape. Give the PNG at least three times as many pixels across, for the sharpest screens.
- **`backgroundColor`** fills the screen around it (`#RRGGBB` or `#RGB`). It stays behind the app as well, so no other color shows between the two. It defaults to white, and on Android to black in dark mode.
- **`dark`** gives the image and the color for dark mode. Without it, dark mode uses the light ones.

### How each platform shows it

- **On iOS,** the build makes the launch screen from these.
- **On Android,** it makes Android 12's splash screen, through AndroidX's `core-splashscreen`, which shows the same splash on Android 7 to 11.
- **Android shows a splash image inside a circle 192 dp across.** A wide image, such as a logo with the name beside it, may have corners that reach past it. Android draws it smaller, and the build warns you, with the widest `imageWidth` that fits.

### When it goes

The splash screen stays up until the app is drawn, and then fades out:

- **By default** it goes at the first frame Angular draws.
- **With [`provideSplashScreen()`](/api/angular-lynx/host/splash-screen.md)**, it waits for the router's first navigation, with its guards, resolvers and lazy routes, or for the app to say it's ready. That covers a first screen that has work to do first, such as restoring a signed-in session.
- **After five seconds**, it goes anyway, so a first screen that never settles can't leave the app behind its logo.

iOS keeps a copy of an app's launch screen until the app is installed again, or sometimes until the phone restarts. If a change doesn't show on the simulator, delete the app and install it again.

## Per-environment values

Use Angular's `configurations` to build variants, such as a staging app that installs next to the real one:

```json title="angular.json"
"configurations": {
  "staging": { "appId": "com.example.myapp.staging", "appName": "My App (Staging)" }
}
```

```bash
ng build --platform ios -c staging
```

Angular merges a configuration into the options one key deep. So a configuration that sets `ios` or `android` replaces that whole object.

## Related

- [Run on iOS and Android](/guide/native-apps/index.md)
- [Publish to the app stores](/guide/publishing.md)
- [The splash screen example](/examples/splash-screen.md)
- [Native app options](/api/build/index.md#native-app-options)
