1
votes

I'm using Mac. I'm trying to generate icons and splash screens using the command

ionic cordova resources ios --icon

but I always get this error:

[WARN] Error occurred during command execution from a CLI plugin (@ionic/cli-plugin-cordova). Your plugins may be out of date.
✖ Generating platform resources - failed!
Error: connect ETIMEDOUT 104.20.7.16:443

icon: icon.png , dimensions 1024x1024.

splash: splash.png , dimensions 2048x2048.

It generates the directory resources/ios/icon contains .png files but when I try to open it I get this alert The file “icon-40.png” could not be opened because it is empty., and when I try to build ios I get this error Error: Source path does not exist: resources/ios/icon/icon-40.png ionic info:

global packages:

@ionic/cli-utils : 1.3.0
Cordova CLI      : 7.0.1 
Ionic CLI        : 3.3.0

local packages:

@ionic/app-scripts              : 1.1.4
@ionic/cli-plugin-cordova       : 1.3.0
@ionic/cli-plugin-ionic-angular : 1.3.0
Cordova Platforms               : android 6.1.2 ios 4.4.0
Ionic Framework                 : ionic-angular 2.3.0

System:

Node       : v6.11.0
OS         : macOS Sierra
Xcode      : Xcode 7.3.1 Build version 7D1014 
ios-deploy : 1.9.1 
ios-sim    : not installed
3

3 Answers

1
votes

Try:

$ sudo npm -g remove cordova ionic && sudo npm install cordova ionic

It is a known issue that sometimes just updating the package doesn't properly patch to the latest version so it's best to remove and re-add completely.

Then run:

$ ionic platform remove ios && ionic platform add ios

and:

$ ionic resources --icon

and finally:

$ npm uninstall @ionic/app-scripts && npm install @ionic/app-scripts@latest --save-dev
1
votes

@maninak, thank you too much. I solved the first error related to the icon path, the separator in the path in config.xml was backslash "\" but it must be forward slash "/" so the OS was unable to read the path. This error happened because i was working on windows first. Generating resources error still exists, I couldn't solve it or find any solutions yet.

ionic info after updating:

global packages:

@ionic/cli-plugin-proxy : 1.3.1
@ionic/cli-utils        : 1.4.0
Cordova CLI             : 7.0.1 
Ionic CLI               : 3.4.0

local packages:

@ionic/app-scripts              : 1.3.7
@ionic/cli-plugin-cordova       : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms               : ios 4.4.0
Ionic Framework                 : ionic-angular 3.3.0

System:

Node       : v6.11.0
OS         : macOS Sierra
Xcode      : Xcode 7.3.1 Build version 7D1014 
ios-deploy : not installed
ios-sim    : not installed
npm        : 5.0.3
1
votes

Splash should be minimum of 2732px by 2732px. While icon should be, as rightly put 1024px by 1024px

Then run ionic cordova resources to generate both.

It should be noted that the command will still generate some files but not all