# `MobDev.LaunchIcon`
[🔗](https://github.com/genericjam/mob_dev/blob/master/lib/mob_dev/launch_icon.ex#L1)

The iOS launch screen's icon: the app icon at 96 pt with rounded corners,
compiled into the app's asset catalog as the image set `MobLaunchIcon`.

iOS shows the launch screen from the user's tap until the app's first
frame, before any of the app's code runs. mob_new's `ios/Info.plist` names
this image in `UILaunchScreen`, so the app's own icon covers process start;
Mob's boot screen (`MobRootView`) then draws the same image in the same
place and adds a loading indicator under it while the BEAM starts.

The image is made at build time from the largest PNG of the plain app icon
(`AppIcon.appiconset`'s Contents.json entries without `appearances`), so it
follows `mix mob.icon` and hand-made icons and nothing is stored in the
project. The rounding is `priv/launch_icon.swift` (CoreGraphics), cached
under the system temp dir by the source PNG and the script.

# `with_catalog`

```elixir
@spec with_catalog(Path.t(), (Path.t() -&gt; result)) :: result when result: var
```

Runs `fun` with the asset catalog to compile and returns its result.

The catalog is a temporary copy of `catalog` with the `MobLaunchIcon` image
set added, removed once `fun` returns. When the app icon has no PNG or the
image cannot be made, `fun` gets `catalog` itself and the launch screen
stays plain, as it was before this image existed: a build never fails over
the launch icon.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
