似乎最近在使用Xcode构建时出现了一些变化和应用程序图标失败的问题,即使文件名和Contents.json中的图标名称匹配,也会显示以下错误:
无法将应用程序图标集中的图像数据从"AppIcon.appiconset/120.png"写入到"/Users/redacted/Library/Developer/Xcode/DerivedData/Runner-gvtobjleqotxoegcxkjxrghpepal/Build/Products/Debug-iphoneos/Runner.app/AppIcon60x60@2x.png"。
或者
应用程序图标集"AppIcon"有一个未分配的子项。
之前所有正常工作的图标生成网站都出现了类似的错误。这是唯一一个有效的网站:
图标名称:
Icon-App-20x20@1x.png Icon-App-20x20@2x.png Icon-App-20x20@3x.png Icon-App-29x29@1x.png Icon-App-29x29@2x.png Icon-App-29x29@3x.png Icon-App-40x40@1x.png Icon-App-40x40@2x.png Icon-App-40x40@3x.png Icon-App-60x60@2x.png Icon-App-60x60@3x.pngIcon-App-76x76@1x.png Icon-App-76x76@2x.png Icon-App-83.5x83.5@2x.png ItunesArtwork@2x.png
Contents.json:
{
"images":[
{
"idiom":"iphone",
"size":"20x20",
"scale":"2x",
"filename":"Icon-App-20x20@2x.png"
},
{
"idiom":"iphone",
"size":"20x20",
"scale":"3x",
"filename":"Icon-App-20x20@3x.png"
},
{
"idiom":"iphone",
"size":"29x29",
"scale":"1x",
"filename":"Icon-App-29x29@1x.png"
},
{
"idiom":"iphone",
"size":"29x29",
"scale":"2x",
"filename":"Icon-App-29x29@2x.png"
},
{
"idiom":"iphone",
"size":"29x29",
"scale":"3x",
"filename":"Icon-App-29x29@3x.png"
},
{
"idiom":"iphone",
"size":"40x40",
"scale":"2x",
"filename":"Icon-App-40x40@2x.png"
},
{
"idiom":"iphone",
"size":"40x40",
"scale":"3x",
"filename":"Icon-App-40x40@3x.png"
},
{
"idiom":"iphone",
"size":"60x60",
"scale":"2x",
"filename":"Icon-App-60x60@2x.png"
},
{
"idiom":"iphone",
"size":"60x60",
"scale":"3x",
"filename":"Icon-App-60x60@3x.png"
},
{
"idiom":"iphone",
"size":"76x76",
"scale":"2x",
"filename":"Icon-App-76x76@2x.png"
},
{
"idiom":"ipad",
"size":"20x20",
"scale":"1x",
"filename":"Icon-App-20x20@1x.png"
},
{
"idiom":"ipad",
"size":"20x20",
"scale":"2x",
"filename":"Icon-App-20x20@2x.png"
},
{
"idiom":"ipad",
"size":"29x29",
"scale":"1x",
"filename":"Icon-App-29x29@1x.png"
},
{
"idiom":"ipad",
"size":"29x29",
"scale":"2x",
"filename":"Icon-App-29x29@2x.png"
},
{
"idiom":"ipad",
"size":"40x40",
"scale":"1x",
"filename":"Icon-App-40x40@1x.png"
},
{
"idiom":"ipad",
"size":"40x40",
"scale":"2x",
"filename":"Icon-App-40x40@2x.png"
},
{
"idiom":"ipad",
"size":"76x76",
"scale":"1x",
"filename":"Icon-App-76x76@1x.png"
},
{
"idiom":"ipad",
"size":"76x76",
"scale":"2x",
"filename":"Icon-App-76x76@2x.png"
},
{
"idiom":"ipad",
"size":"83.5x83.5",
"scale":"2x",
"filename":"Icon-App-83.5x83.5@2x.png"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"scale" : "1x",
"filename" : "ItunesArtwork@2x.png"
}
],
"info":{
"version":1,
"author":"redacted"
}
}