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:
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
The same options hold the rest of the native settings:
- Turn on device features, such as Bluetooth or the calendar, and add links that open the app.
- Permissions: the reasons iOS shows when the app asks.
- The build API 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, 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:
foregroundis 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.backgroundis a color (#RRGGBBor#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:
imageis a PNG with transparency, drawn in the middle of the screen. Without one, iOS shows the color alone, and Android the app's icon.imageWidthis 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.backgroundColorfills the screen around it (#RRGGBBor#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.darkgives 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
imageWidththat 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 merges a configuration into the options one key deep. So a configuration that sets ios or android replaces that whole object.
