最近将我的应用程序提交到 App Store 时出现此错误。
ITMS-90892:缺少推荐图标 - 该捆绑包不包含适用于 iPad 的备用应用程序图标,该图标的像素正好为“167x167”(对于支持 iPad Pro 的 iOS 版本,采用 .png 格式)。为了支持较旧的操作系统,资产目录之外的捆绑包中可能需要该图标。确保 Info.plist 文件包含引用该文件的适当条目。看
我认为它与应用程序结构中的备用图标和名称有关,但与资产目录无关。在我的应用程序中,用户可以选择主屏幕的图标。
我有 4 个图标可供选择,每个图标有 4 个尺寸,例如 - AA_appIcon@2x、AA_appIcon@2x~iPad、AA_appIcon@3x、AA_appIcon83.5@2x~iPad,它曾经工作正常,但现在我收到此错误名称为 AA_appIcon83.5@2x~iPad。它的尺寸正确为 167x167,所以不确定问题是什么。这只是最近几天发生的,一个月前我上一次提交时没有发生。
命名格式最近一定发生了变化或者其他什么。有人能发现错误吗?
这是info.plist
<dict>
<key>CFBundleAlternateIcons</key>
<dict>
<key>AA</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>AA_appIcon</string>
</array>
<key>UIPrerenderedIcon</key>
<string>No</string>
</dict>
<key>Cake</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Cake_appIcon</string>
</array>
<key>UIPrerenderedIcon</key>
<string>No</string>
</dict>
<key>NA</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>NA_appIcon</string>
</array>
<key>UIPrerenderedIcon</key>
<string>No</string>
</dict>
<key>OA</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>OA_appIcon</string>
</array>
<key>UIPrerenderedIcon</key>
<string>No</string>
</dict>
</dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Cake_appIcon</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>
<dict>
<key>CFBundleAlternateIcons</key>
<dict>
<key>AA</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>AA_appIcon</string>
</array>
<key>UIPrerenderedIcon</key>
<string>No</string>
</dict>
<key>Cake</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Cake_appIcon</string>
</array>
<key>UIPrerenderedIcon</key>
<string>No</string>
</dict>
<key>NA</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>NA_appIcon</string>
</array>
<key>UIPrerenderedIcon</key>
<string>No</string>
</dict>
<key>OA</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>OA_appIcon</string>
</array>
<key>UIPrerenderedIcon</key>
<string>No</string>
</dict>
</dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Cake_appIcon</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>
Run Code Online (Sandbox Code Playgroud)
War*_*ing 12
ITMS-90890如果您遇到错误或ITMS-90892等问题,那么截至 2021 年末,您需要执行以下操作。
| 文件名 | 尺寸 |
|---|---|
| 图标名称@2x.png | 120x120 |
| 图标名称@3x.png | 180x180 |
| IconName@2x~ipad.png | 152x152 |
| IconName@3x~ipad.png | 167x167 |
~ipad*注意!上缺少大写字母
根据@Warpling 的回答,以下是正确设置备用图标所需的一切:
首先,您必须AlternateAppIcons在主项目(info.plist文件所在的位置)内创建一个文件夹(例如)。
现在,在您创建的文件夹中,添加具有表中所述名称和大小的文件:
| 文件名 | 尺寸 |
|---|---|
| 图标名称@2x.png | 120x120 |
| 图标名称@3x.png | 180x180 |
| IconName@2x~ipad.png | 152x152 |
| IconName@3x~ipad.png | 167x167 |
IconName,请确保也在info.plist.info.plist您必须将其添加到info.plist:
<key>CFBundleIcons</key>
<dict>
<key>CFBundleAlternateIcons</key>
<dict>
<key>IconName</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>IconName</string>
</array>
</dict>
</dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array/>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>
<key>CFBundleIcons~ipad</key>
<dict>
<key>CFBundleAlternateIcons</key>
<dict>
<key>IconName</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>IconName</string>
</array>
</dict>
</dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array/>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>
Run Code Online (Sandbox Code Playgroud)
您所要做的就是验证应用程序是否支持备用图标并更改它:
guard UIApplication.shared.supportsAlternateIcons else { return }
UIApplication.shared.setAlternateIconName("IconName")
Run Code Online (Sandbox Code Playgroud)
*您可能想创建一些像这样的enum助手。
由于 SwiftUI放弃了 info.plist 的要求,因此您必须以不同的方式进行声明;在项目中搜索“应用程序图标”Build Settings即可编辑相关设置。
您可以查看Apple 的新文档,其中还包括一个示例项目(查看其README.md)。
您可能还会发现这篇文章很有帮助。
没关系
我刚刚将图标从AA_appIcon83.5@2x~iPad.png重命名AA_appIcon@3x~ipad.png为 ,错误消失了,图标选择器仍然可以在应用程序内工作。
| 归档时间: |
|
| 查看次数: |
3784 次 |
| 最近记录: |