ios - 缺少图标 - 如何添加 Xcode appicon 模板中不可用的图标?
问题描述
我正在使用 Xcode 10.0,但由于各种原因无法更新到 Xcode 10.1。我需要包含提交应用程序所需的 WatchApp 图标(50x50 和 108x108),但这些集在 10.0 的模板中不可用,我想它们已添加到 10.1。即使在我的 Xcode 版本中没有标记为 50x50 和 108x108 的插槽,我如何手动包含此图标?
我正在尝试将图标直接添加到图标集文件夹中,图标出现在 Xcode 上,但我看到了这个警告......
Warning: The app icon set "AppIcon" has 2 unassigned children
解决方案
您可以尝试手动更新 Contents.json 文件。
这是我的所有图标的样子,您可以使用它作为基础,在您的图标中添加缺少的部分:
{
"images" : [
{
"size" : "24x24",
"idiom" : "watch",
"filename" : "Icon-24@2x.png",
"scale" : "2x",
"role" : "notificationCenter",
"subtype" : "38mm"
},
{
"size" : "27.5x27.5",
"idiom" : "watch",
"filename" : "Icon-27.png",
"scale" : "2x",
"role" : "notificationCenter",
"subtype" : "42mm"
},
{
"size" : "29x29",
"idiom" : "watch",
"filename" : "Icon-29@2x.png",
"role" : "companionSettings",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "watch",
"filename" : "Icon-29@3x.png",
"role" : "companionSettings",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "watch",
"filename" : "Icon-40@2x.png",
"scale" : "2x",
"role" : "appLauncher",
"subtype" : "38mm"
},
{
"size" : "44x44",
"idiom" : "watch",
"filename" : "Icon-44@2x.png",
"scale" : "2x",
"role" : "appLauncher",
"subtype" : "40mm"
},
{
"size" : "50x50",
"idiom" : "watch",
"filename" : "Icon-50@2x.png",
"scale" : "2x",
"role" : "appLauncher",
"subtype" : "44mm"
},
{
"size" : "86x86",
"idiom" : "watch",
"filename" : "Icon-86@2x.png",
"scale" : "2x",
"role" : "quickLook",
"subtype" : "38mm"
},
{
"size" : "98x98",
"idiom" : "watch",
"filename" : "Icon-98@2x.png",
"scale" : "2x",
"role" : "quickLook",
"subtype" : "42mm"
},
{
"size" : "108x108",
"idiom" : "watch",
"filename" : "Icon-108@2x.png",
"scale" : "2x",
"role" : "quickLook",
"subtype" : "44mm"
},
{
"size" : "1024x1024",
"idiom" : "watch-marketing",
"filename" : "Icon-1024.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
推荐阅读
- python - 如何从 Kaggle Football 数据中找到具有多个匹配项的 id
- java - 如何正确使用 Scanner 打印输出流
- swift - 如何使用 MDL 对边界框进行命中测试
- c++ - 如何确保 DirectX 11 应用在带有 C++ 的双 GPU 笔记本电脑上使用独立 GPU?
- websocket-sharp - WebSocketSharp - 禁用控制台日志记录不起作用
- javascript - 解析 package.json 数据失败,package.json 必须是实际的 JSON,而不仅仅是 JavaScript
- context-free-grammar - 从语言生成上下文无关语法
- json - 附加到 JSON 数组的 Powershell 脚本
- apache-pig - 分组时如何获取包中的第一个元组
- r - 合并时间和日期列时不需要的 NA