Changing the app icon in React Native involves configuring platform-specific assets for Android and iOS. The app icon is the first visual identity of your application and must follow strict size and format rules defined by each platform.
React Native does not provide a JavaScript API to change app icons at runtime. Icons are defined at build time and bundled with the app. You must replace or regenerate icon assets in native folders.
// Android icon location inside the project
android/app/src/main/res/mipmap-hdpi/ic_launcher.png
android/app/src/main/res/mipmap-mdpi/ic_launcher.png
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
// iOS AppIcon set location
ios/YourAppName/Images.xcassets/AppIcon.appiconset
After rebuilding the app, the new icon appears on the device home screen and app drawer. Old icons may be cached, so uninstalling the app before reinstalling is recommended.
The diagram below explains how a single source icon is converted into multiple platform-specific assets:
In React Native, you provide a square image, but the OS (Operating System) crops it differently. Use the controls below to see how your "App Icon" would look on different devices.