XCode adding duplicate and incorrect icon filenames to Info.plist

When I run the XCode 'Archive' command, I get seven error messages about missing files. Most are for the launch files that are supposed to be there, but one contains the misspelling "Portait".

warning: Icon specified in the Info.plist not found under the top level app wrapper: Default-Portait~ipad.png (-19007)
Unable to validate your application. - (null)

I did enter that filename by mistake several months ago, but I thought I expunged it from the project. Here is the 'Info.plist' file for my app. Note that it has no icon entries, other than Icon file .

Info.plist的应用程序

Here is my Target Summary. I have launch images specified.

XCode目标摘要

When I look at the 'Info.plist' file within the newly created archive, it contains a whole list of icons. I've showing Icon files (iOS 5) here, but the list is duplicated under Icon files . The "Portait" misspelling is there, as are several duplicates. It's mess.

在这里输入图像描述

I know that XCode automatically generates some content for 'Info.plist', but where is this long list of filenames coming from? And, how can I prevent them being generated?

What I Have Tried

  • I have run 'Clean' and deleted my XCode 'DerivedData' directory, but the warning messages and spurious Info.plist entries persist.
  • I checked the localized 'InfoPlist.strings', but it only contains the line /* Localized versions of Info.plist keys */ .
  • I looked through the contents of my '.xcodeproj' package, but found no mention of the files it's trying to find.
  • I tried adding an empty array of icon files to my 'Info.plist', or adding the names of the exact files I wanted. The bad and duplicate names still get appended to the end when I Archive.
  • I tried duplicating the Target (which, as usual, duplicated the existing Info.plist file). Archiving the new target resulted in the same error.
  • The Build Setting Preprocess Info.plist File was off. I tried switching it on; it made no difference.
  • I tried switching off the Build Setting Expand Build Settings in Info.Plist File . It told that I was trying to run the file '${EXECUTABLE_NAME}'. I went to my 'Info.plist' and changed Executable file from '${EXECUTABLE_NAME}' to a hard-coded text value, and also manually replaced the other '${...}' entries. Despite this, it persists in trying to run '${EXECUTABLE_NAME}'. Possibly whatever is adding to the icon settings is also overriding my executable name.
  • What I Would Rather Not Do

    I could probably suppress the warning by adding files to the project with the names it expects, including Default-Portait~ipad.png . I'd really rather stop it these names being added to 'Info.plist' in the first place, since those duplicate entries could cause other problems down the line.

    Other Details

    This project was created in early 2011, and has been progressively migrated through newer versions of XCode. It is currently open in XCode Version 4.3.2 (4E2002).


    Found it: choose a Target and go to the 'Info' tab, and you get something that looks like 'Info.plist'... but changes made there can override your Info.plist. This was especially confusing because I had intentionally made multiple Targets share the same 'Info.plist' file, to avoid needing to make the same change in multiple places.

    I would still welcome an explanation of where these settings are stored within the '.xcodeproj' package.


    I have the same issue -- Xcode did this to me for a new project. My info tab on the target shows the same mess. I guess I will check for updated iOS6 docs and edit the entries here to the best form.

    链接地址: http://www.djcxy.com/p/78988.html

    上一篇: 如何在Qt项目视图中设置单个单元格的委托?

    下一篇: XCode向Info.plist添加重复和不正确的图标文件名