Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[opinion] icon and splashscreen generators should not be used from this lib #523

Open
lone-cloud opened this issue Jul 21, 2018 · 9 comments

Comments

@lone-cloud
Copy link

Not sure if it's worth listing this in the corber.io documentation.

Android:
icons: the generator only produces legacy icons. I think it's much better to create icons through android studio here as they also produce the new adaptive icons for >=Oreo devices.
splashscreen: OK

iOS:
icons: OK
splashscreen: the generator doesn't produce the new storyboard style splashscreens which are required for the app to be displayed well (no top black bar) on an iPhone X.

@ddoria921
Copy link
Contributor

I would like to see the new asset size requirements for both iOS & Android worked into the generators. I find the existing generators very valuable.

@alexblom
Copy link
Member

I agree we should extend Android support where possible.

We've debated pulling the generators out to their own repo that can be used with / without corber a little better. Icons is our only use of PhantomJS, which feels a little heavy for those not using our icon generators.

@MatthewPringle
Copy link

MatthewPringle commented Oct 5, 2018

I would suggest creating an android project just to make the new icon using Android Studio. You can have this inside a resources folder where Cordova can grab them when adding the android platform.

Just open Image Asset Studio in Android Studio and you can import a SVG or PNG, position and save. It's actually really good.

I also found adding <preference name="SplashMaintainAspectRatio" value="true" /> made the currently generated splashscreens work a lot better on tall phones.

<resource-file src="../resources/icons/android/app/src/main/res/drawable/ic_launcher_foreground.xml" target="app/src/main/res/drawable/ic_launcher_foreground.xml" />
<resource-file src="../resources/icons/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml" target="app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml" />
<resource-file src="../resources/icons/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml" target="app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml" />
<resource-file src="../resources/icons/android/app/src/main/res/mipmap-mdpi/ic_launcher.png" target="app/src/main/res/mipmap-mdpi/ic_launcher.png" />
<resource-file src="../resources/icons/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png" target="app/src/main/res/mipmap-mdpi/ic_launcher_round.png" />
<resource-file src="../resources/icons/android/app/src/main/res/mipmap-hdpi/ic_launcher.png" target="app/src/main/res/mipmap-hdpi/ic_launcher.png" />
<resource-file src="../resources/icons/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png" target="app/src/main/res/mipmap-hdpi/ic_launcher_round.png" />
<resource-file src="../resources/icons/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png" target="app/src/main/res/mipmap-xhdpi/ic_launcher.png" />
<resource-file src="../resources/icons/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png" target="app/src/main/res/mipmap-xhdpi/ic_launcher_round.png" />
<resource-file src="../resources/icons/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png" target="app/src/main/res/mipmap-xxhdpi/ic_launcher.png" />
<resource-file src="../resources/icons/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png" target="app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png" />
<resource-file src="../resources/icons/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png" target="app/src/main/res/mipmap-xxxhdpi/ic_launcher.png" />
<resource-file src="../resources/icons/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png" target="app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png" />
<resource-file src="../resources/icons/android/app/src/main/res/values/ic_launcher_background.xml" target="app/src/main/res/values/ic_launcher_background.xml" />

@joshmccall221
Copy link

@hoboman313 , this would be great addition to the docs.

If the icon generator is pulled out or Android Studio is preferred it would be great to keep existing functionality or at least the command that prints out how to do things better.

Our CI/CD currently relies on generate-[icons/splash] commands since we generate each build.

@DuBistKomisch
Copy link
Contributor

DuBistKomisch commented Jan 24, 2019

For the record, I don't believe the iOS splashscreen complaint in the OP to be correct, as I fixed it in isleofcode/splicon#20 by adding an extra resolution which for some reason fixes the letterboxing without needing storyboard style splashes. This is still working for us.

Android adaptive icon support is a good idea. 👍

@DuBistKomisch
Copy link
Contributor

phantomjs-prebuilt is becoming more of a liability, is there any interest in porting splicon to e.g. puppeteer instead?

alternative a way to make it not required would be nice. making splicon a peer dependency is a bit hacky but could work?

P.S. I think the direct dependency of corber on svg2png is a leftover so can just be removed

@alexblom
Copy link
Member

It really is getting in the way. I'd be open to that - alternatively I think in the short term we may remove those tools from the core lib and document the choices people have. If I can't have it resolved by next release I think we will need to take that approach.

@MatthewPringle
Copy link

MatthewPringle commented Jan 29, 2020

All I do now for iOS splash screens is have one image, Default@2x~universal~anyany.png with a resolution of 2732 × 2732. Seems to work fine.

<platform name="ios">
<splash src="../resources/splash-screens/ios/Default@2x~universal~anyany.png"/>
</platform>

@cmubo
Copy link

cmubo commented Feb 8, 2022

Hey, any update on this? I've recently forked off myself and removed any reference to splicon due to PhantomJs breaking builds on the newer Apple M1 chipset, not sure if anyone else is having the same experience?

Forked branch

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

No branches or pull requests

7 participants