In this post, you will learn about the plugin for automatic resizing of icons. You must know that both android and iOS platform needs different size of icons according to different devices.
If you need to change your app icon in your cordova application, you have to regenerate app icons of all sizes again.
To generate icons automatically you can use this plugin. This can work by using ImageMagick which resize image and create it with the command line.
1. Install cordova icon using npm:
$ npm install cordova-icon -g
2. Install ImageMagick:
$ brew install imagemagick
3. Create a cordova application:
$ cordova create hello com.example.hello HelloWorld
4. Go into your cordova project folder and add the platforms which you need:
$ cordova platform add ios
$ cordova platform add android
5. Then save an icon.png file which is needed for your app icon to your project folder and run this command:
$ cordova-icon
After running the cordova-icon, all the icons will generate in your project folders.
cordova-icon is simply a script that takes a file from your cordova project folder named icon.png and then generate icons of different sizes according to platforms that you have added into your cordova project.
0 Comment(s)