在尝试验证我的存档应用程序时,我一直在阅读很多关于“无效图像路径”验证失败的消息。我的问题是,我已经在使用资产目录,但由于某种原因,它现在无法识别 AppIcon 图像集。
这是我在 Xcode 5 中的资产目录的屏幕截图:
这是我当前的目标设置,如果我单击 AppIcon 的小右箭头,它会将我带到正确的图像:
这是我在验证我最近创建的存档后遇到的错误:
存档也没有图标:
这是我的 info.plist 文件内容:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIcons</key>
<dict>
<key>UINewsstandIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>newsstand-app-icon</string>
</array>
<key>UINewsstandBindingEdge</key>
<string>UINewsstandBindingEdgeLeft</string>
<key>UINewsstandBindingType</key>
<string>UINewsstandBindingTypeMagazine</string>
</dict>
</dict>
<key>CFBundleIcons~ipad</key>
<dict>
<key>UINewsstandIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>newsstand-app-icon</string>
</array>
<key>UINewsstandBindingEdge</key>
<string>UINewsstandBindingEdgeLeft</string>
<key>UINewsstandBindingType</key>
<string>UINewsstandBindingTypeMagazine</string>
</dict>
</dict>
<key>CFBundleIdentifier</key>
<string>com.magloft.magazine</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>newsstand-content</string>
<string>remote-notification</string>
</array>
<key>UINewsstandApp</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIStatusBarHidden</key>
<false/>
<key>UIStatusBarHidden~ipad</key>
<false/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
这是 AppIcon 图标集的 Contents.json 文件的内容:
{
"images" : [
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "iphone-29x29.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "iphone-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "iphone-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "57x57",
"idiom" : "iphone",
"filename" : "iphone-57x57.png",
"scale" : "1x"
},
{
"size" : "57x57",
"idiom" : "iphone",
"filename" : "iphone-57x57@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "iphone-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "ipad-29x29.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "ipad-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "ipad-40x40.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "ipad-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "50x50",
"idiom" : "ipad",
"filename" : "ipad-50x50.png",
"scale" : "1x"
},
{
"size" : "50x50",
"idiom" : "ipad",
"filename" : "ipad-50x50@2x.png",
"scale" : "2x"
},
{
"size" : "72x72",
"idiom" : "ipad",
"filename" : "ipad-72x72.png",
"scale" : "1x"
},
{
"size" : "72x72",
"idiom" : "ipad",
"filename" : "ipad-72x72@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "ipad-76x76.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "ipad-76x76@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"pre-rendered" : true
}
}
我尝试了以下方法但没有成功:
1) 删除 AppIcon 图像集并通过将其添加到 Xcode 中并将图像拖动到所有占位符来从头开始创建一个新图像集。2)从 info.plist 中删除了 CFBundleIcons 3)从 info.plist 中删除了 CFBundleIcons~ipad(我添加了这个,因为我的应用程序不会在货架上显示 iOS 7+ 中的默认报亭图标,这修复了它。4)从上面删除了两个键,但仍然出现错误,包括缺少键/值表单报摊图标绑定类型。5) 尝试针对 iOS 7.0 而不是 iOS 6.0。
我不知道为什么会突然发生这种情况。我在想可能是因为我将 Xcode 更新到了 5.1 版(5B130a)?我正在运行我认为最新的 OSX 10.9.2。
我确实找到了这个Invalid Image Path - No image found at the path。CFBundleIcons Xcode 5这听起来很像我的情况。我已确保实际资产目录是目标的一部分(参见第一个屏幕截图),但 OP 谈到确保每个图像都是目标的一部分?
更新:添加已编译的 Info.plist 内容。我无法打开它,因为它被压缩了,所以我抓住了一个屏幕截图。我可以看到一些对图像的引用,但不知道在 Xcode 项目中的哪里可以找到这些?我试图搜索一些名称,但没有产生任何结果。
我的构建日志看起来不错,但这个警告很突出:
Warning: The Copy Bundle Resources build phase contains this target's Info.plist file 'Baker/Magloft-Info.plist'.
不知道这意味着什么,但我删除了 app-info.plist 文件,创建了一个新文件并从原始 app-info.plist 文件复制到 XML 中(这是基于一个有效的开源项目)。
有什么建议可以尝试吗?谢谢!