The package uses an Expo Config Plugin to copy alternative icons to your native projects.
- Add
expo-alternate-app-icons to the plugins array in your app.json. - The plugin configuration is an array of icon objects.
- Run
npx expo prebuild --clean to apply the changes to your native projects.
Icon Naming: Icon names are automatically converted to PascalCase. For example, providing "icon-a" will result in the icon being identified as "IconA" in the API.
// app.json
{
// ...
plugins: [
// ...
[
'expo-alternate-app-icons',
[
{
name: 'IconA',
ios: {
light: './assets/icon-a.png',
dark: './assets/icon-a-dark.png',
tinted: './assets/icon-a-tinted.png',
},
android: {
foregroundImage: './assets/icon-a-foreground.png',
backgroundColor: '#001413',
},
},
{
name: 'IconB',
ios: './assets/icon-b.png',
android: {
foregroundImage: './assets/icon-b-foreground.png',
backgroundColor: '#001413',
},
},
],
],
],
}