Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
310 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 Reply

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...