Command palette

@yasinsensoy/native

React Native · APIs and utilities

App icon

Selectable icons and switching.

2 exports

Import

import { DEFAULT_ICON, AppIcon } from "@yasinsensoy/native";

AppIcon

module

Selectable icons and switching.

NameTypeDescription
isSupported() => booleanDoes the device support changing the icon (iOS: supportsAlternateIcons).
names() => string[]Names from ui.config icon.alternates; the primary icon ("default") is not included.
get() => Promise<string>Name of the selected icon; "default" for the primary icon.
set(name: string) => Promise<void>Changes the icon; "default" returns to the primary icon. - iOS: changes immediately; the system shows the user an info dialog. - Android: applied when the app goes to the background (changing the launcher component while open kills the app on some devices). get() returns the pending choice.

DEFAULT_ICON

constant

Name of the primary icon.

DEFAULT_ICON: