react-native-alternate-icons
React Native Alternate Icons for iOS 10.3+
Requirements
- React Native 0.44+ (only tested on 0.44)
Installation
npm install react-native-alternate-icons@latest --save
Link the library to your React Native project
react-native link
Manual Linking
https://facebook.github.io/react-native/docs/linking-libraries-ios.html
Preparation & Code Sample
Preparation
Add your icons into your Xcode Project
Add the following code to your info.plist
supportsAlternateIconsCFBundleIcons CFBundlePrimaryIcon CFBundleIconFiles icon UIPrerenderedIcon CFBundleAlternateIcons Red CFBundleIconFiles Red UIPrerenderedIcon
Using in your React Native applications
; /** Change the icons of your application */Icons;/** get Current Icon Name */Icons;/** Reset the icon of your application to the default */Icons;/** Check if your device does support alternate icons, android returns always false */Icons;