How to tell Xcode where my info.plist and .pch files are

I renamed my project and it's files and now Xcode is still looking for the old info.plist file. Where do I set the locations of the .plist and .pch files that it needs.

In my Project Info window, under Packaging there's an item for Info.Plist file, but it was blank, and when I try different paths, nothing happens. On compile it still says it can't find the plist by the old name.


Solution 1:

I know this answer is answered and closed, but I'm going to add my discoveries here as it is slightly different for Xcode 4.2:

  • Select your project
  • In the left side of the middle pane, select your app under "Targets"
  • Select the tab "Build Settings"
  • Search the following keywords: "info.plist" and "pch"
  • At this point it should be pretty clear which are the ones you need to modify.
  • Click on "Validate Settings" and you're done.

Solution 2:

Found it. It was in the settings for the Target.

  • Choose Target in the Groups and Files pane on the left.
  • Right-Click and choose Get Info
  • Search for "Info.Plist" and type in the filename for the correct plist file into the property of the item named "Info.Plist File".
  • Then search for "Prefix" and find the item named "Prefix Header".
  • Change it's property to the name of the correct .pch file that you are using.

I think these different "Info" windows are confusing. You have to make sure the right file is selected in the Groups and Files pane before selecting "Get Info", and it's hard to tell if what you're doing is actually making changes to the Info.plist file, or where your changes are being saved.

Solution 3:

For Xcode 10.1 when rename or move info.plist to sub folder.

  • Select your project
  • Choose targets
  • In General tab under Indentity you can specify new info.plist file