The Wayback Machine - https://web.archive.org/web/20221116223457/https://github.com/AppAndFlow/react-native-set-app-icon
Skip to content

AppAndFlow/react-native-set-app-icon

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
ios
 
 
 
 
 
 
 
 
 
 
 
 
 
 

react-native-set-app-icon

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

import SetAppIcon from "react-native-set-app-icon";

changeAppIcon

Promise that returns a boolean. Takes the iconName name set in your config.

SetAppIcon.changeIcon(iconName: string): Promise<boolean>;

If you want to set the default back just use null.

SetAppIcon.changeIcon(null);

getIconName

Takes a callback and receives an object with iconName in it.

SetAppIcon.getIconName(cb: (icon: { iconName: string }) => void): void;

supportsDynamicAppIcon

Returns a Promise with a boolean if the device accepts the dynamic app icon change.

SetAppIcon.supportsDynamicAppIcon(): Promise<boolean>;

About

Set the app icon in your react-native in app

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published