tags:

views:

313

answers:

2

I have an Xcode project and needed to change the name of the product it builds. I went through the project files with a fine-toothed comb and thought I had made every change possible. The last step was to grep all files in the project folder for occurrences of the old name. It comes up clean.

But after a build grep finds a file which contains several occurrences of the old name. It is in a location like: MyProjectFolder/build/MyProject.build/MyProject.pbxindex/strings.pbxstrings/strings

I can't imagine where it is getting the old name from. Also, I have no idea what this file is used for. But I am concerned that apparently I haven't purged the old name everywhere.

Can anyone tell me what the ...pbxstrings/strings file is for and how it gets built? If I understand that I can probably track down the last remnants of the old name and purge them.

+3  A: 

That MyProject.pbxindex is just there for CodeSense. :) Close Xcode and delete the MyProject.pbxindex directory (make a copy if you are skeptical) and then reopen Xcode. It will rebuild it.

If you wanted to, you could do this from the command line:

xcodeindex -project /path/to/your/project clean build

I would just do the first one though.

BobbyShaftoe
I could not figure out what the pbxindex was used for until I read this answer. All the google results were dead ends.
Dara Kong
+1  A: 

Clicking the "Rebuild CodeSense Index" button in the project inspector's General pane is probably easier than issuing command-line commands that do the same thing.

The indexer doesn't purge index entries for deleted entries immediately, but that will have no effect on your build.

cdespinosa