It generates your assets and it also adds them correctly to your ios and android project.
You need node 6 installed and image-magick.
Then install the generator with
npm install -g yo generator-rn-toolbox
Have a single icon file at the ready somewhere. 200x200px is sufficient.
Then in your React Native project, run:
yo rn-toolbox:assets --icon <path to your icon>
# For instance
yo rn-toolbox:assets --icon ../icon.png
enter code here
You will be asked for the name of your react-native project. For instance, if you created your project with react-native init MyAwesomeProject
, your project name is MyAwesomeProject
.
When you are asked, ? Overwrite ios/MyAwesomeProject/Images.xcassets/AppIcon.appiconset/Contents.json?
, reply with Y.
And... that's it!