Open lone-cloud opened 6 years ago
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.
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.
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" />
@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.
For the record, I don't believe the iOS splashscreen complaint in the OP to be correct, as I fixed it in https://github.com/isleofcode/splicon/pull/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. :+1:
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
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.
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>
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?
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.