ember-cli-cordova icon indicating copy to clipboard operation
ember-cli-cordova copied to clipboard

Splash Screen and Icon support

Open billybonks opened this issue 10 years ago • 21 comments

Feature proposal

initial proposal for how this would work

Add  a single icon file under cordova root directory
Add  a single splash screen image (2048x2048)  under cordova root directory

on cdv:build

  • convert icons into required formats
  • copy icons into appropriate directory
  • will copy splashscreen appropriate directory

Cordova Splash Screen and Icon documentation

config

  • Make sure added to res config.xml

code reference https://gist.github.com/LinusU/7515016

billybonks avatar Sep 17 '14 12:09 billybonks

  1. will this feature convert the icon into all densities and sizes

I'm cool with it converting icons. Since those are all squash dimensions it's easy is something I want in my projects. We can't do that with splash screens though unfortunately since they are all different dimensions.

  1. if it converts file, will this happen every time cordova build is run ?
  2. will the icons be copied every time cordova build is run ?
  3. if feature is run every time, how will this impact performance?

I think that would be overkill. Since I'm pretty much expecting people to run cdv:build to build for the app store and such I think we can expect that to be run and convert them then.

jakecraige avatar Sep 17 '14 13:09 jakecraige

added the information, anything else you want to add to the feature task list ?

billybonks avatar Sep 17 '14 14:09 billybonks

We can probably use these libs to do this: https://github.com/AlexDisler/cordova-icon and https://github.com/AlexDisler/cordova-splash It does have an ImageMagick dependency so I we'd need to make sure to properly warn user if we find the icon/splashscreen files and attempt to convert them. and they don't have it, but that'll be easy

jakecraige avatar Oct 04 '14 17:10 jakecraige

thats a good idea, nice find :)

billybonks avatar Oct 05 '14 12:10 billybonks

Just a thought, should the icon file and splashscreen file be added to root of the cli project or root of the cordova project?

billybonks avatar Oct 21 '14 15:10 billybonks

@billybonks The cordova root would be good. Since it's specific to cordova and there's already enough things in the cli root

jakecraige avatar Oct 21 '14 16:10 jakecraige

I forked another lib at one point and modified it a lot to be able to do exactly this in a grunt workflow. Now that I'm converting from the grunt based one to this I'd be willing to convert it for use here.

https://github.com/runspired/grunt-phantom-svg2png

runspired avatar Nov 03 '14 20:11 runspired

@runspired does it have any dependencies ? for eg the libs @jakecraige suggested require ImageMagick to be installed on the computer

billybonks avatar Nov 03 '14 20:11 billybonks

The only "complicated" one is phantomjs, which ember-cli already recommends be installed globally. Otherwise it's pretty straightforward.

runspired avatar Nov 03 '14 21:11 runspired

@billybonks @runspired I feel like we could safely assume phantomjs in installed since ember-cli uses it for ember test anyways. And If not, we can just warn that this feature doesn't work without it. I'd love if either of you wanted to take this on. I have no preference on which lib to use

jakecraige avatar Nov 03 '14 21:11 jakecraige

i think that if we can get the version running with phantomJS it would be better, though not sure how to structure it. does grunt play nicely with embercli, should it be moved into broccoli etc

billybonks avatar Nov 04 '14 12:11 billybonks

@billybonks It definitely needs to be moved to broccoli or just use fs directly. We can't add grunt as a dependency, lol

jakecraige avatar Nov 04 '14 13:11 jakecraige

I'll rewrite it as a broccoli task, won't have time until late tonight and tomorrow to work on it, so expect an update near the end of the week.

runspired avatar Nov 04 '14 14:11 runspired

sounds good.

billybonks avatar Nov 04 '14 14:11 billybonks

I needed to get #85 rolling before this, but with my PR submitted for that I've got time now to do that rewrite.

I've also been thinking about doing automated screenshots, either via https://github.com/gitawego/cordova-screenshot or http://phantomjs.org/screen-capture.html

Essentially the idea would be to define various routes and controller/model states at which you want to generate screenshots on varying devices for the Apple/Android stores. Thoughts?

runspired avatar Nov 12 '14 17:11 runspired

@runspired Now that would be mega-cool. That's always something I've found annoying to manually do

jakecraige avatar Nov 12 '14 17:11 jakecraige

How is this coming along?

I am super excited about this feature. In the long term by adding more features along the line of this to ember-cli-cordova and pairing it up with liquid-fire we can create a real ionicframework.com competitor built upon the ember ecosystem.

Bright :star::star::star::star:s ahead :)

xypaul avatar May 09 '15 01:05 xypaul

I have a grunt plugin that does this, but have not converted to broccoli yet.

runspired avatar May 09 '15 17:05 runspired

for reference, this is the grunt plugin that I need to move to being a broccoli plugin https://github.com/runspired/grunt-phantom-rasterize

runspired avatar Aug 17 '15 15:08 runspired

Also I think we can do splashscreen support by having a background and a main area that are specified and then sizing the main area appropriately and centering it and sizing the background appropriately.

runspired avatar Aug 17 '15 15:08 runspired

@runspired that sounds great. looking forward to see how you go with it.

xypaul avatar Aug 18 '15 06:08 xypaul