Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
315 views
in Technique[技术] by (71.8m points)

ios - Xcode 5: "Invalid image path" CFBundleIcons

Ok, my problem seems to be similar to this, and this, but following the answers, there is not helping me. This might be because I am using Xcode 5, before I upgraded to this version I wasn't having any problems with this app.

When I validate my app I get the following error:

"Invalid Image Path - No image found at the path referenced under key 'CFBundleIcons': 'icon152'"

So I go to the .plist file in Xcode, right click Show Raw Keys/Values and find CFBundleIcons.

There is a tree that looks like this:

▼ CFBundleIcons                  Dictionary
    ▼ CFBundlePrimaryIcon        Dictionary
        ▼ CFBundleIconFiles      Array
             Item 0              String       icon152

Now I've renamed icon152 to icon152.png, and it still doesn't work. Does this value require the full path to the image on my mac? And if it does, why am I not getting the full path inserted when I add the image from scratch? I've validated apps before and never experienced these problems.

I've tried removing all the icon entries out of the .plist file and re-adding them, still doesn't work.

I've tried removing the images from the bundle and Xcode altogether, and completely re-added them from scratch. Still doesn't work.

Can anybody tell me what I am doing wrong?

EDIT:

If anybody else is struggling with this, all I did to solve it was click the "Use Asset Catalog" button - and all these problems disappeared. You can find that button by clicking on your project in the Navigator, then under General scroll down to App Icons - the button should be there.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I had the same error as ckoskar, "Invalid Image Path - No image found at the path referenced under key 'CFBundleIcons': 'icon120x120'"

I ended up deleting the file from the CarPlay section in the AppIcon part of Images.xcassets, and then I was able to submit the build.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...