- Run
npm install cordova-res --save-dev - Create
1024x1024pxicon atresources/icon.png - Create
2732x2732pxsplash atresources/splash.png - Add
"resources": "cordova-res ios && cordova-res android && node scripts/resources.js"toscriptsinpackage.json - Copy
resources.jsfile toscripts/resources.js - Run
sudo chmod -R 777 scripts/resources.js - Run
npm run resources
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This function converts the byte to the corresponding amount, be it kilo, mega, GB, etc. | |
| const convertWeightByte = (byte) => { | |
| let sizekiloByte = (byte / 1024); | |
| let sizeMega = (sizekiloByte / 1024); | |
| let sizeGigabyte = (sizeMega / 1024); | |
| let sizeTerabyte = (sizeGigabyte / 1024); | |
| let sizePetabyte = (sizeTerabyte / 1024); | |
| let sizeExabyte = (sizePetabyte / 1024); | |
| if(sizekiloByte > 0 && sizekiloByte <= 1024){ |