https://github.com/appandflow/react-native-set-app-icon
Set the app icon in your react-native in app
https://github.com/appandflow/react-native-set-app-icon
react-native
Last synced: about 1 year ago
JSON representation
Set the app icon in your react-native in app
- Host: GitHub
- URL: https://github.com/appandflow/react-native-set-app-icon
- Owner: AppAndFlow
- Created: 2020-06-04T15:19:29.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2025-01-08T16:01:52.000Z (over 1 year ago)
- Last Synced: 2025-05-07T11:14:27.444Z (about 1 year ago)
- Topics: react-native
- Language: Objective-C
- Homepage:
- Size: 1.53 MB
- Stars: 30
- Watchers: 4
- Forks: 3
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

### About
App & Flow is a Montreal-based React Native engineering and consulting studio. We partner with the world’s top companies and are recommended by [Expo](https://expo.dev/consultants). Need a hand? Let’s build together. team@appandflow.com
Let your users dynamically change their app icons directly from within the app.
## ANDROID IN PROGRESS
## Getting started
`$ npm install react-native-set-app-icon --save`
### Mostly automatic installation
`$ react-native link react-native-set-app-icon`
## IOS
Setup XCode
Put all your images as `@2x.png` `@3x.png` in the root of your project setup.

Once that's done, go to `Info.plist` and follow this setup :

## Usage
```javascript
import SetAppIcon from "react-native-set-app-icon";
```
### changeAppIcon
Promise that returns a boolean. Takes the `iconName` name set in your config.
```js
SetAppIcon.changeIcon(iconName: string): Promise;
```
If you want to set the default back just use `null`.
```js
SetAppIcon.changeIcon(null);
```
### getIconName
Takes a callback and receives an object with `iconName` in it.
```js
SetAppIcon.getIconName(cb: (icon: { iconName: string }) => void): void;
```
### supportsDynamicAppIcon
Returns a Promise with a boolean if the device accepts the dynamic app icon change.
```js
SetAppIcon.supportsDynamicAppIcon(): Promise;
```