For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /guide/native-apps/app-identity.md.

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:

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"
  }
}
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, and it can't change afterwards.

The options

OptionDescription
appNameThe name under the icon. ng add sets it to the project name
appIdThe iOS bundle ID and Android application ID. Two or more dot-separated parts of letters and digits, each starting with a letter
versionThe 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
buildNumberA whole number that must increase with every store upload. Defaults to 1
iconA 1024×1024 PNG without transparency. Both apps' icon is made from it: see The app icon
splashWhat shows from the tap on the app's icon until its first screen is ready: an image on a color. See The splash screen
orientationportrait (default), landscape or all

The same options hold the rest of the native settings:

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, 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:

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:

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(), 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:

angular.json
"configurations": {
  "staging": { "appId": "com.example.myapp.staging", "appName": "My App (Staging)" }
}
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.