0
votes

Type: bug

Platform: mobile webview

I tried to use the ionic splash and icon generator from the blog/website tutorial. It would not read my png files, even though I placed them in the root. I converted them to ai files and they would return an error saying the files could not be read (although they would open in preview and in Adobe Illustrator).

Then i used the cordova generator instructions and got this error:

{ [Error: Command failed: convert: unable to open image platforms/ios/splash/Resources/icons/[email protected]': No such file or directory @ error/blob.c/OpenBlob/2675. convert: WriteBlob Failedplatforms/ios/splash/Resources/icons/[email protected]' @ error/png.c/MagickPNGErrorHandler/1630. ] timedOut: false, killed: false, code: 1, signal: null }

3
If you believe this is a bug in Ionic, you should file it with them.Dawson Loudon
I've done so- just asked here because I figured someone might've come across a similar problem and solved it on their own.Martin Uhomoibhi

3 Answers

1
votes

If you're using one of the latest version of Ionic-CLI things should work properly.

npm update -g ionic

to update your cli.

Once you have created your project you have to add a platform:

ionic platform add android

ionic platform add ios

In the root of your project you should find a folder called resources.

Place an icon file and a splash screen file:

  • icon.png
  • splash.png

The icon image's minimum dimensions should be 192x192 px, and should have no rounded corners.

now, from the root folder of your project:

ionic resources

and it should create the resources for all the platform defined.

Some reference here and here.

0
votes

You can also use tools to generate the files. I created a NodeJS repo to facilitate the icon and splash screen generation for Ionic. So everyone can create all .png files in seconds.

https://github.com/dericeira/Icon-Splash-Resize

First, install

npm install icon-splash-resize

Then put, the files in resources folder

icon.png (192x192px)

splash.png (2732x2732px)

Then, run

node start

Note you will need GraphicsMagick or ImageMagick installed

brew install imagemagick
brew install graphicsmagick
0
votes

My problem was that the image files in the /resources folder were .jpg, apparently, changing them to .png made everything work smoothly.