apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.15k stars 986 forks source link

In 6.3.0 icons listed in config.xml are no longer getting copied to the platform folder when ios platform is added #1344

Closed pschinis closed 11 months ago

pschinis commented 11 months ago

Bug Report

Cordova-ios 6.3.0 doesn't appear to respect icon config in config.xml when adding iOS as a platform. This is working as expected in 6.2.0 and 6.1.1

Problem

App gets built with the default cordova icon instead of the one listed in my config.xml

What is expected to happen?

The icons in my resources folder should get copied to the appropriate platform directory (as configured in my config file) so when I remove and re-add the platform the app keeps the correct icon.

What does actually happen?

Nothing is copied over and the default cordova icon is used for the app.

Information

Command or Code

cordova platform rm ios cordova platform add ios@6.3.0

Environment, Platform, Device

My relevant config looks like this:

<platform name="ios">
      <icon height="57" src="resources/ios/icon/icon.png" width="57" />
      <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
      <icon height="20" src="resources/ios/icon/icon-20.png" width="20" />
      <icon height="40" src="resources/ios/icon/icon-20@2x.png" width="40" />
      <icon height="60" src="resources/ios/icon/icon-20@3x.png" width="60" />
      <icon height="29" src="resources/ios/icon/icon-29.png" width="29" />
      <icon height="58" src="resources/ios/icon/icon-29@2x.png" width="58" />
      <icon height="87" src="resources/ios/icon/icon-29@3x.png" width="87" />
      <icon height="48" src="resources/ios/icon/icon-24@2x.png" width="48" />
      <icon height="55" src="resources/ios/icon/icon-27.5@2x.png" width="55" />
      <icon height="88" src="resources/ios/icon/icon-44@2x.png" width="88" />
      <icon height="172" src="resources/ios/icon/icon-86@2x.png" width="172" />
      <icon height="196" src="resources/ios/icon/icon-98@2x.png" width="196" />
      <icon height="216" src="resources/ios/icon/icon-108@2x.png" width="216" />
      <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
      <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
      <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
      <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
      <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
      <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
      <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
      <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
      <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
      <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
      <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
      <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
      <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
      <icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
  </platform>

Version information

Cordova 12 Cordova-ios 6.3.0 Mac OS Ventura 13.4 iOS 16.5 on my personal iPhone Xcode 14.3.1

Checklist

pschinis commented 11 months ago

This was caused by an invalid URL in my allow-navigation setup interacting poorly with some changes to cordova's whitelisting code (parseWhitelistUrlForATS) and causing the platform add to error out before the platform finished adding.