Skip to content
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.

Specify platform & folder to generate icons #26

Open
loicknuchel opened this issue Jan 6, 2015 · 6 comments
Open

Specify platform & folder to generate icons #26

loicknuchel opened this issue Jan 6, 2015 · 6 comments

Comments

@loicknuchel
Copy link

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

@tomchiverton
Copy link

Same here.

@ivywireline
Copy link

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.

@augustoabreu
Copy link

Maybe specify the file name too? I've used cordova-icon to generate notification icon for Android, but had to rename all generated images.

@nexorianus
Copy link

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

@alexkander
Copy link

alexkander commented Nov 19, 2018

Hi everyone, I made a pullrequest which it can do this. [https://github.com//pull/130](pull request 130).

$ cordova-icon --iconspath=platforms/android/res/ --platforms=android
$ cordova-icon --platforms=ios:windows

I hope it helps, regards

@farrisbar
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants