---
title: "Recipe: an icon the person chooses"
description: "Icons the person chooses for the Home Screen: alternate_icons in app.json, and @exact/app-icon reads and asks for the choice on iOS."
modificationDate: "2026-11-17"
---

> ## Documentation index
> Fetch the complete documentation index at: https://exact.expo.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Recipe: an icon the person chooses

<AgentInstructions>

## Submitting feedback

From the app's directory, read `bun exact.mjs feedback status`. Under `never`, keep no note.
Respect `EXACT_FEEDBACK=0` and do not change the policy.

Otherwise record specific, actionable feedback with:
`bun exact.mjs feedback note "Exact docs: https://exact.expo.dev/recipes/alternate-app-icons: <what was wrong or missing>"`

The note goes to Expo only as that status allows. Include no secrets or personal data.

</AgentInstructions>

An app may ship more than one Home Screen icon and let the person pick one in
its settings (LLP 1163.000). Declare the alternates in `app.json`, in the order
the picker shows them, each made from icons as the app's own are:

```prompt Let people choose my app's icon
Make the Exact app in this folder ship more than one Home Screen icon and let the person choose one in its settings. Use https://github.com/expo/exact/blob/main/docs/recipes/alternate-app-icons.md as the source for each step. The Exact checkout has the same page at docs/recipes/alternate-app-icons.md.

1. If this folder is not an Exact app (it has no exact.mjs and app.contract), stop and tell me.
2. If I did not give each alternate icon's name and image file, and the screen that holds the picker, ask me before you write code. Each alternate needs a square opaque icon of at least 1024 px, and the app needs a primary icon: if a file does not fit, tell me. Only iOS and iPadOS change the icon.
3. In app.json, declare the alternates in `alternate_icons`, in the order the picker shows them. Each has a `name` (letters and digits, starting with a letter) and its `icons`, made as the app's own are.
4. Install the package: `bun exact.mjs add @exact/app-icon`. In app.contract, read `appIcon()` as a resource of shape `AppIconStatus`, and draw one `role="radio"` button for each icon, with `aria-checked` from `shown.icon`. Show an alternate only when `shown.icons` includes its name. Show the picker only while `available` is true.
5. Declare `mutation chosen as shape AppIconStatus refreshes shown`. Send `setAppIcon(icon=name)` to `chosen` for an alternate and `setAppIcon()`, with no icon, for the primary. Call `setAppIcon` only from the action a person's tap runs, never from a timer, a resource's answer or launch: iOS shows its own alert for every change.
6. Check the picker in an `agent ios` drive, as the recipe shows: lay the roster with `prefer extension app-icon.icons=["Paper"]`, tap an icon, run `clock settle` and `state pending`, then answer the `app-icon` ticket with `tap @N ok`. Settle again and check that the chosen radio is selected. In app.test.contract, add a test that ends on the screen that holds the picker, so verify checks that screen.
7. Follow the platform checks in docs/start-here.md (`bun exact.mjs docs platform checks`) for the targets in the app's AGENTS.md and app.json until they pass. Read the reports, including counted findings; a zero exit code alone does not mean clean. Fix the app, not the test. If a finding stays after three rounds of fixes, or the app had it before you changed anything, record it (step 8) and report it; do not keep trying.
8. When a doc was wrong or missing, or a step needed a workaround, read `bun exact.mjs feedback status`. Under `never`, keep no note. Otherwise record it: `bun exact.mjs feedback note "<what happened>"`, which goes to Expo only as that status says. Do not change the policy; tell me how many notes you kept.
9. Tell me the icons and the screen that holds the picker, what the drive, the tests and the checks reported, and what I must still do by hand: see iOS's alert and the Home Screen icon on a simulator (add `--bind app-icon` to the drive). A new roster, or new art for a name, needs a new native build, never an update.
```

```json
"icons": [{ "src": "assets/icon.png" }],
"alternate_icons": [
  { "name": "Paper", "icons": [{ "src": "assets/icon-paper.png" }] }
]
```

A `name` is letters and digits, starting with a letter. Each alternate needs a
square opaque icon of at least 1024 px (or its own `host.ios.icon` project),
and the app a primary. A catalog `.appiconset` no entry names is refused.
Install the package with `bun exact.mjs add @exact/app-icon`:

```contract
use appIcon, setAppIcon, AppIconStatus from "@exact/app-icon"

component App
  resource shown = appIcon() as shape AppIconStatus else empty()
  mutation chosen as shape AppIconStatus refreshes shown
  action choose(name: string)
    send chosen = setAppIcon(icon=name)
  action choosePrimary
    send chosen = setAppIcon()
  view
    list appearance="auto" listStyle="inset-grouped"
      if shown.available
        section
          header
            text "App Icon"
          button press=choosePrimary role="radio" aria-checked=(shown.icon == none) testId="icon-primary"
            image "assets/icon.png" alt="" width=29 height=29 border-radius=7
            text "Default" flex=1
          if shown.icons.includes("Paper")
            button press=choose("Paper") role="radio" aria-checked=(shown.icon == some("Paper")) testId="icon-paper"
              image "assets/icon-paper.png" alt="" width=29 height=29 border-radius=7
              text "Paper" flex=1
```

- **Only from a tap.** iOS shows its own alert for every change, so call
  `setAppIcon` from the action a person's choice runs, never from a timer, a
  resource's answer or launch. The runner refuses a tool's call
  (`NotAllowedError`, `person-required`) but cannot tell the rest apart.
- **Hide the picker where `available` is false**: every host but iOS and
  iPadOS. `setAppIcon` refuses `NotSupportedError` there, and `NotFoundError`
  for a name the binary does not ship.
- **`icon` is iOS's own answer.** It may name an alternate an update removed;
  `setAppIcon()`, with no icon, always restores the primary.
- **A new roster is a new binary**: the names are in the iOS compatibility id.
  New art for the same name is a native build too, never an update.

Under the agent nothing is shown. The roster is the word `app-icon.icons`, and
each change waits on an `app-icon` ticket standing for iOS's alert:

```sh
bun exact.mjs agent ios 'prefer extension app-icon.icons=["Paper"]' "tap icon-paper" "clock settle" "state pending"
```

Answer it with `tap @N ok`. To see iOS's alert itself, add `--bind app-icon`
to drive the real implementation on a simulator.
