【发布时间】:2020-04-09 21:26:05
【问题描述】:
我通过 CLI 创建了一个新的 Cordova for iOS 项目并在 Xcode 中打开它。 选择 Archive -> Distribute 后,在上传到 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
每个图标都在图像资源文件夹中。如何修复此错误?
【问题讨论】:
-
粘贴您的 config.xml 或至少粘贴 ios 图标的部分
-
感谢您的建议,完成
标签: ios xcode cordova app-store-connect