cordova-icon
cordova-icon copied to clipboard
Specify platform & folder to generate icons
Hi,
It would be nice if there is some parameters to specify wanted generated platform and output folder. In my case I locally build Android and I want to build iOS on phonegap build. So I have to provide Android and iOS icons in the www folder but as I only added Android, iOS icons are not generated :(
Thanks for all
Same here.
Same here. The iOS icons are being generated in the wrong folder as of the latest Cordova version. It should be in Resources/icons instead of Images.xcassets. Adding this option will help in case the folder path changes again in the future cordova versions.
Maybe specify the file name too? I've used cordova-icon to generate notification icon for Android, but had to rename all generated images.
I would only like to be able to specify the platform. File names and folder structures should be handled by this tool and it beeing kept up-to-date with cordova
Hi everyone, I made a pullrequest which it can do this. [https://github.com/AlexDisler/cordova-icon/pull/130](pull request 130).
$ cordova-icon --iconspath=platforms/android/res/ --platforms=android
$ cordova-icon --platforms=ios:windows
I hope it helps, regards
Another way to address this is to only generate for the platform targeted by the cordova prepare command. For example: cordova prepare ios ==> should only generate icons for ios cordova prepare android ==> should only generate icons for andriod cordova prepare ==> generates for both ios and android.
This can be fixed with a single line update to index.js (for each platform, android example below):
isAdded : fs.existsSync('platforms/android') && process.env.CORDOVA_PLATFORMS.includes('android')
I do not have time right now to put this in a pull request, but I have tested this in my local installation.