React Native Alternate Icons for iOS 10.3+
- React Native 0.44+ (only tested on 0.44)
npm install react-native-alternate-icons@latest --save
react-native link
https://facebook.github.io/react-native/docs/linking-libraries-ios.html
<key>supportsAlternateIcons</key>
<true/>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>icon</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
<key>CFBundleAlternateIcons</key>
<dict>
<key>Red</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Red</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>
</dict>
import Icons from 'react-native-alternate-icons';
/** Change the icons of your application */
Icons.setIconName( iconName );
/** get Current Icon Name */
Icons.getIconName( callback( result ) );
/** Reset the icon of your application to the default */
Icons.reset();
/** Check if your device does support alternate icons, android returns always false */
Icons.supportDevice( callback( result ) );