Search code examples
iphoneiosxcodeipadxcode4

InfoPlist.strings path and SVN


I am facing an issue for which I can't seem to find a solution.

I am working on a project which has 2 localizations, english and french.

The default localization is english, and I added the french one afterwards.

So far so good, the InfoPlist.strings are localized and I can see the two different files for this:

InfoPlist.strings (English)

InfoPlist.strings (French)

However, I am using SVN for source control, and when I commit the project on one machine, and do an update on another, i get a build error stating that

"The file InfoPlist.strings couldn't be opened because there's no such file".

I gathered that this error is due to InfoPlist.strings (French) not being found. Indeed, this file is red in the project navigator.

When I click on the file and check its identity (in the right pane of Xcode), I can see that its path is in fact the absolute path to the file on the other machine that did the SVN commit.

The problem is that the path is uneditable. The "Location" dropdown menu is grayed out (and blocked on "Absolute"), so I have no way of changing the path to a relative path which, I believe, would solve the problem.

The only workaround is to remove the french localization and re-add it again, which, as I'm sure you'll agree, is far from ideal.

Is there any way to change the absolute path of the localized InfoPlist.strings file to a relative path ?

Thanks in advance,

Regards Xcode, iOS 5


Solution

  • Open your xcode project file (*.xcodeproj) by "Show Package Contents" in Finder. Then open the project.pbxproj inside it with a text editor - you can find and change the path there.

    Reference: Moving localization folders in Xcode 4