适用于iOS的Cordova错误ITMS-90022:“缺少所需的图标文件”

时间:2019-12-17 11:20:14

标签: ios xcode cordova app-store-connect

我通过CLI创建了一个新的 Cordova for iOS 项目,并在Xcode中将其打开。 选择存档-> 蒸馏后,此错误会在上传到AppStore流程结束时出现。

  

错误ITMS-90022:“缺少必需的图标文件。捆绑软件没有   包含精确为“ 120x120”的iPhone / iPod Touch应用程序图标   像素,适用于iOS版本> = 7.0的.png格式。”

设置:

  • Cordova版本:9.0.0(cordova-lib@9.0.1)
  • Xcode版本:11.2.1
  • macOS版本:10.15

config.xml

    <?xml version='1.0' encoding='utf-8'?>
<widget id="com.example.app" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Example</name>
    <description>
        A sample Apache Cordova application that responds to the deviceready event.
    </description>
    <author email="dev@cordova.apache.org" href="http://cordova.io">
        Apache Cordova Team
    </author>
    <content src="index.html" />
    <plugin name="cordova-plugin-whitelist" spec="1" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />
    </platform>
   <platform name="ios">
   <!-- iOS 8.0+ -->
        <!-- iPhone 6 Plus  -->
        <icon src="res/ios/icon-60@3x.png" width="180" height="180" />
        <!-- iOS 7.0+ -->
        <!-- iPhone / iPod Touch  -->
        <icon src="res/ios/icon-60.png" width="60" height="60" />
        <icon src="res/ios/icon-60@2x.png" width="120" height="120" />
        <!-- iPad -->
        <icon src="res/ios/icon-76.png" width="76" height="76" />
        <icon src="res/ios/icon-76@2x.png" width="152" height="152" />
        <!-- Spotlight Icon -->
        <icon src="res/ios/icon-40.png" width="40" height="40" />
        <icon src="res/ios/icon-40@2x.png" width="80" height="80" />
        <!-- iOS 6.1 -->
        <!-- iPhone / iPod Touch -->
        <icon src="res/ios/icon.png" width="57" height="57" />
        <icon src="res/ios/icon@2x.png" width="114" height="114" />
        <!-- iPad -->
        <icon src="res/ios/icon-72.png" width="72" height="72" />
        <icon src="res/ios/icon-72@2x.png" width="144" height="144" />
        <!-- iPad Pro -->
        <icon src="res/ios/icon-167.png" width="167" height="167" />
        <!-- iPhone Spotlight and Settings Icon -->
        <icon src="res/ios/icon-small.png" width="29" height="29" />
        <icon src="res/ios/icon-small@2x.png" width="58" height="58" />
        <icon src="res/ios/icon-small@3x.png" width="87" height="87" />
        <!-- iPad Spotlight and Settings Icon -->
        <icon src="res/ios/icon-50.png" width="50" height="50" />
        <icon src="res/ios/icon-50@2x.png" width="100" height="100" />
        <!-- iPad Pro -->
        <icon src="res/ios/icon-83.5@2x.png" width="167" height="167" />     
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
    </platform>
</widget>

CLI命令:

cordova create example com.example.app Example
(cd example)
cordova platform add ios 
cordova plugin add cordova-plugin-splashscreen
cordova-icon
cordova-splash

我尝试过的方法:清理构建文件夹/更新节点/ NPM /更新Xcode

每个图标都在图像资产文件夹中。如何解决这个错误?

1 个答案:

答案 0 :(得分:1)

好像您缺少所有图标的参考。这是您需要在config.xml中具有的功能,以便在ios节点中设置所有图标

    <icon height="29" platform="ios" src="res/icons/ios/icon-29.png" width="29" />
    <icon height="40" platform="ios" src="res/icons/ios/icon-40.png" width="40" />
    <icon height="48" platform="ios" src="res/icons/ios/icon-48.png" width="48" />
    <icon height="50" platform="ios" src="res/icons/ios/icon-50.png" width="50" />
    <icon height="55" platform="ios" src="res/icons/ios/icon-55.png" width="55" />
    <icon height="57" platform="ios" src="res/icons/ios/icon-57.png" width="57" />
    <icon height="58" platform="ios" src="res/icons/ios/icon-58.png" width="58" />
    <icon height="60" platform="ios" src="res/icons/ios/icon-60.png" width="60" />
    <icon height="72" platform="ios" src="res/icons/ios/icon-72.png" width="72" />
    <icon height="76" platform="ios" src="res/icons/ios/icon-76.png" width="76" />
    <icon height="80" platform="ios" src="res/icons/ios/icon-80.png" width="80" />
    <icon height="87" platform="ios" src="res/icons/ios/icon-87.png" width="87" />
    <icon height="88" platform="ios" src="res/icons/ios/icon-88.png" width="88" />
    <icon height="100" platform="ios" src="res/icons/ios/icon-100.png" width="100" />
    <icon height="114" platform="ios" src="res/icons/ios/icon-114.png" width="114" />
    <icon height="120" platform="ios" src="res/icons/ios/icon-120.png" width="120" />
    <icon height="144" platform="ios" src="res/icons/ios/icon-144.png" width="144" />
    <icon height="152" platform="ios" src="res/icons/ios/icon-152.png" width="152" />
    <icon height="167" platform="ios" src="res/icons/ios/icon-167.png" width="167" />
    <icon height="172" platform="ios" src="res/icons/ios/icon-172.png" width="172" />
    <icon height="180" platform="ios" src="res/icons/ios/icon-180.png" width="180" />
    <icon height="196" platform="ios" src="res/icons/ios/icon-196.png" width="196" />
    <icon height="216" platform="ios" src="res/icons/ios/icon-216.png" width="216" />
    <icon height="1024" platform="ios" src="res/icons/ios/icon-1024.png" width="1024" />