Reputation: 1903
I'm using cordova build to generate an iOS project for my app. In my config.xml I specified the following resources:
<icon height="29" src="res/icons/ios/icon-small.png" width="29" />
<icon height="58" src="res/icons/ios/icon-small-2x.png" width="58" />
<icon height="40" src="res/icons/ios/icon-40.png" width="40" />
<icon height="80" src="res/icons/ios/icon-40-2x.png" width="80" />
<icon height="50" src="res/icons/ios/icon-50.png" width="50" />
<icon height="100" src="res/icons/ios/icon-50-2x.png" width="100" />
<icon height="57" src="res/icons/ios/icon.png" width="57" />
<icon height="114" src="res/icons/ios/icon-2x.png" width="114" />
<icon height="60" src="res/icons/ios/icon-60.png" width="60" />
<icon height="120" src="res/icons/ios/icon-60-2x.png" width="120" />
<icon height="180" src="res/icons/ios/icon-60-3x.png" width="180" />
<icon height="72" src="res/icons/ios/icon-72.png" width="72" />
<icon height="144" src="res/icons/ios/icon-72-2x.png" width="144" />
<icon height="76" src="res/icons/ios/icon-76.png" width="76" />
<icon height="152" src="res/icons/ios/icon-76-2x.png" width="152" />
<splash height="480" src="res/screens/ios/screen-iphone-portrait.png" width="320" />
<splash height="960" src="res/screens/ios/screen-iphone-portrait-2x.png" width="640" />
<splash height="1136" src="res/screens/ios/screen-iphone-portrait-568h-2x.png" width="640" />
<splash height="1334" src="res/screens/ios/screen-iphone-portrait-667h.png" width="750" />
<splash height="2208" src="res/screens/ios/screen-iphone-portrait-736h.png" width="1242" />
<splash height="1024" src="res/screens/ios/screen-ipad-portrait.png" width="768" />
<splash height="2048" src="res/screens/ios/screen-ipad-portrait-2x.png" width="1536" />
(./res and res were also tried)
When I run cordova buid ios
I get an error for each of these specified files:
cp: no such file or directory: /path/to/project/config.xml/res/icons/ios/icon-60.png
It looks like config.xml is used as a directory. (The correct path is without config.xml). How can fix this?
Upvotes: 2
Views: 1244
Reputation: 1903
For those in need:
After hours of debugging I figured out that cordova-ios incorrectly implemented the various paths. After fixing this myself I found out this was already done in a newer version in this commit.
Solutions was removing cordova-ios cordova platform remove ios
and re-adding using cordova platform add ios@latest
.
Upvotes: 1