Skip to content
Tutorials Center
My learning

Topics

Lesson 31 of 37 ยท Building and Publishing

App Icons, Splash Screens and Permissions

Generate app icons and splash screens with Capacitor Assets, configure the splash screen plugin, declare Android and iOS permissions and write store-safe permission texts.

Before a store accepts your app, three details need to be right: the icon on the home screen, the splash screen shown while the app starts, and the permissions the app declares. They look like polish, but they cause some of the most common rejections: a missing icon size, a splash that never hides, or a permission text that does not say why the app needs the camera.

App icons

Each platform wants many sizes: Android needs several densities and an adaptive icon made of a foreground and a background layer (so the system can crop it into a circle, squircle or square), and iOS needs a set of sizes plus a 1024 x 1024 marketing icon without transparency.

You do not make these by hand. The official @capacitor/assets tool generates everything from a few source files:

Terminal
npm install -D @capacitor/assets
mkdir -p assets
# put these files in assets/
#   icon-only.png        1024x1024
#   icon-foreground.png  1024x1024 (transparent, art inside the central safe zone)
#   icon-background.png  1024x1024
#   splash.png           2732x2732
#   splash-dark.png      2732x2732 (optional)
npx capacitor-assets generate

Design guidelines:

  • Keep the important art in the center 66 percent of the adaptive foreground, because masks crop the edges.
  • Use a simple shape that reads at 48 px. Fine text becomes unreadable.
  • iOS rejects marketing icons with an alpha channel; export without transparency.
  • Do not use the store's own badges or other brands' logos.

What sizes are produced

JS Icon sizes from density buckets

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Splash screen

The splash screen covers the time between tapping the icon and the first drawn page. Capacitor's @capacitor/splash-screen plugin controls it:

TypeScript
// capacitor.config.ts
plugins: {
  SplashScreen: {
    launchShowDuration: 0,        // do not auto-hide on a timer
    launchAutoHide: false,        // we hide it ourselves when ready
    backgroundColor: '#0b5fff',
    androidSplashResourceName: 'splash',
    showSpinner: false,
  },
},
TypeScript
import { SplashScreen } from '@capacitor/splash-screen';

// after the first page and initial data are ready
await SplashScreen.hide({ fadeOutDuration: 200 });

Android 12 and later show a system splash made from your icon and a background color, whatever you configure. The plugin works with that API, so design the icon to look fine centered on a solid color.

A splash that is visible for more than two or three seconds feels slow. Load data after the first screen, show skeletons for lists, and hide the splash as soon as something useful can be drawn.

Permissions

A permission is a request to use something sensitive: camera, location, contacts, notifications, photos. Both stores want you to ask only for what you need, at the moment you need it, with a clear reason.

Android

Permissions are declared in android/app/src/main/AndroidManifest.xml. Capacitor plugins add their own entries, and you check the merged result in Android Studio ("Merged Manifest" tab):

XML
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

Dangerous permissions are requested at run time by the plugin's requestPermissions(). Remove permissions you do not use; Google Play reviews sensitive ones (background location, SMS, all-files access) and may ask for a justification video.

iOS

iOS needs a usage description string for every protected feature in ios/App/App/Info.plist. The text is shown in the permission dialog:

XML
<key>NSCameraUsageDescription</key>
<string>Trail Notes uses the camera so you can attach photos to your notes.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Choose photos from your library to add to a note.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Your location is used to show nearby trailheads while the app is open.</string>

Missing keys crash the app when the feature is used, and vague texts ("needs camera") get rejected by App Review. Write one sentence: what feature, and why.

Permission map

A table in your repository that maps each feature to permissions and strings prevents surprises in review. This stand-in builds the native requirements from a feature list and checks wording.

JS From features to permissions

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Asking well

A good permission flow has three steps:

  1. Explain first in your own UI ("We use your location to show nearby trails") with a button.
  2. Ask only when the user taps it, so the system dialog has context.
  3. Handle no: continue with a reduced feature, and offer a link to the system settings later.
JS A pre-permission flow

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is the purpose of an Android adaptive icon's two layers?

    Foreground and background layers can be masked and moved separately by the launcher.
  2. 2. What happens on iOS if NSCameraUsageDescription is missing and the app opens the camera?

    iOS terminates apps that access a protected resource without a usage description.
  3. 3. Which is the best moment to ask for location permission?

    Asking in context, with an explanation, leads to more grants and better reviews.
  4. 4. Why set launchAutoHide: false in the splash config?

    Hiding manually avoids a white flash if the app needs more time than a fixed timer.

Summary

  • Generate icons and splash screens from source images with @capacitor/assets.
  • Keep adaptive icon art in the safe zone; iOS marketing icons have no transparency.
  • Hide the splash screen when the first useful screen is ready.
  • Declare only needed permissions; iOS needs clear usage strings.
  • Explain, then ask, then handle denial gracefully.

Next: Publishing, PWA and Live Updates