将新的版本上传到Appstore Connect时,会发出“图标丢失”的警告。
因此,我去了Watchkitapp的资产目录,却找不到要添加的长形通知图标?可以看到简短的通知。我尝试创建一个用于监视的示例新项目,并发现了相同的示例。
我想念什么?在何处添加用于长时通知的图标?
答案 0 :(得分:4)
这是Xcode 10的问题,而Xcode 9很好。此问题的解决方案是:
{
"images" : [
{
"size" : "24x24",
"idiom" : "watch",
"filename" : "App-icon-48X48@2x.png",
"scale" : "2x",
"role" : "notificationCenter",
"subtype" : "38mm"
},
{
"size" : "27.5x27.5",
"idiom" : "watch",
"filename" : "App-icon-55X55@2x.png",
"scale" : "2x",
"role" : "notificationCenter",
"subtype" : "42mm"
},
{
"size" : "29x29",
"idiom" : "watch",
"filename" : "App-icon-58X58.png",
"role" : "companionSettings",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "watch",
"filename" : "App-icon-87X87.png",
"role" : "companionSettings",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "watch",
"filename" : "App-icon-80X80@2x.png",
"scale" : "2x",
"role" : "appLauncher",
"subtype" : "38mm"
},
{
"size" : "44x44",
"idiom" : "watch",
"filename" : "AppIcon44x44@2x.png",
"scale" : "2x",
"role" : "appLauncher",
"subtype" : "40mm"
},
{
"size" : "50x50",
"idiom" : "watch",
"filename" : "AppIcon50x50@2x.png",
"scale" : "2x",
"role" : "appLauncher",
"subtype" : "44mm"
},
{
"size" : "44x44",
"idiom" : "watch",
"filename" : "AppIcon44x44@2x.png",
"scale" : "2x",
"role" : "longLook",
"subtype" : "42mm"
},
{
"size" : "50x50",
"idiom" : "watch",
"filename" : "AppIcon50x50@2x.png",
"scale" : "2x",
"role" : "longLook",
"subtype" : "44mm"
},
{
"size" : "86x86",
"idiom" : "watch",
"filename" : "App-icon-172X172@2x.png",
"scale" : "2x",
"role" : "quickLook",
"subtype" : "38mm"
},
{
"size" : "98x98",
"idiom" : "watch",
"filename" : "App-icon-196X196@2x.png",
"scale" : "2x",
"role" : "quickLook",
"subtype" : "42mm"
},
{
"size" : "108x108",
"idiom" : "watch",
"filename" : "AppIcon104x104@2x.png",
"scale" : "2x",
"role" : "quickLook",
"subtype" : "44mm"
},
{
"size" : "1024x1024",
"idiom" : "watch-marketing",
"filename" : "iTunesArtwork.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"pre-rendered" : true
}
}
答案 1 :(得分:0)
我能够使我的构建通过验证。
您实际需要做的就是添加四个png图标。 Apple Watch主屏幕40mm 2x和44mm 2x,然后也适用于Apple Watch Short Look 40mm 2x和44mm 2x。所有这四个都显示在上方的中间行。
一些说明可能会有所帮助。
1)我正在运行Xcode 10.1,但我怀疑10也可以工作。
2)我的问题是我在一个大型项目中有多个资产文件,并且正在为错误的.xcasset文件添加图标。当我在WatchApp目标下查看“警告”时,我注意到提到一个图像的父级不存在的人。单击后,将我带到WatchApp目标的正确资产文件。 (“无主”图像可以安全地丢弃)
3)确保图标图像中没有Alpha通道。如果是这样,您将收到另一个令人沮丧的构建错误。您可以通过在“预览”中打开.png文件,然后导出图像并查看是否有一个用于Alpha的复选框来检查它们是否存在。如果是这样,请取消选中它并保存文件,然后使用这些图像。