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

Splash Screen and Icon support #59

Open
billybonks opened this issue Sep 17, 2014 · 21 comments
Open

Splash Screen and Icon support #59

billybonks opened this issue Sep 17, 2014 · 21 comments

Comments

@billybonks
Copy link
Contributor

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

@jakecraige
Copy link
Contributor

  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.

@billybonks
Copy link
Contributor Author

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

@jakecraige
Copy link
Contributor

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

@billybonks
Copy link
Contributor Author

thats a good idea, nice find :)

@billybonks
Copy link
Contributor Author

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

@jakecraige
Copy link
Contributor

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

@runspired
Copy link
Contributor

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

@billybonks
Copy link
Contributor Author

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

@runspired
Copy link
Contributor

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

@jakecraige
Copy link
Contributor

@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

@billybonks
Copy link
Contributor Author

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

@jakecraige
Copy link
Contributor

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

@runspired
Copy link
Contributor

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.

@billybonks
Copy link
Contributor Author

sounds good.

@runspired
Copy link
Contributor

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?

@jakecraige
Copy link
Contributor

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

@xypaul
Copy link

xypaul commented May 9, 2015

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 ⭐⭐⭐⭐s ahead :)

@runspired
Copy link
Contributor

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

@runspired
Copy link
Contributor

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
Copy link
Contributor

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.

@xypaul
Copy link

xypaul commented Aug 18, 2015

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

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

No branches or pull requests

4 participants