I can't add platform in ionic getting these lines

Apples-MacBook-Pro:ionicc1 apple$ ionic cordova platform add ios

cordova platform add ios --save
:heavy_multiplication_x: Running command - failed!
[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.

[ERROR] An error occurred while running cordova platform add ios --save (exit
code 1):

Using cordova-fetch for cordova-ios@~4.4.0
Adding ios project...
Creating Cordova project for the iOS platform:
Path: ../../../../documents/projects/ionic_vaioti/ionicc1/platforms/ios
Package: com.vaioti
iOS project created with cordova-ios@4.4.0
Error: Source path does not exist:

#ionic info
Apples-MacBook-Pro:ionicc1 apple$ ionic info

global packages:

@ionic/cli-utils : 1.4.0
Cordova CLI : 7.0.1
Ionic CLI : 3.4.0
local packages:

@ionic/app-scripts : 1.3.4
@ionic/cli-plugin-cordova : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms : android 6.1.2 ios 4.4.0
Ionic Framework : ionic-angular 2.0.0-rc.5-201701232249

Node : v6.11.0
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
ios-deploy : not installed
ios-sim : not installed
npm : 3.10.10

Please edit your post and use the </> button above the post input field to format your code or error message or wrap it in ``` (“code fences”) manually. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.

This is outdated, upgrade to latest (1.3.8) please.

Does this file exist?
Is it referred to in config.xml?
If it doesn’t exist: Can you fix this by running ionic cordova resources?

resources\android\icon\drawable-xhdpi-icon.png is exist.

So the error message is lying?

Run cordova platform add ios --debug.

from your config.xml flie replace any backslashes() in the paths by forward slashes (/).
the path should be resources/android/icon/drawable-xhdpi-icon.png

1 Like