Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

File in the project not seen by Xcode after Git pull

Tags:

git

xcode

A partner and I are managing an Xcode project via Git. He recently "localized" the project, which added a directory for German ("de.lproj") to the project with a number of files. After I pulled those changes over to my copy of the project, Xcode now fails to compile complaining that two files in this directory don't exist. These files are present in the filesystem, but displayed as red (missing) in the Xcode sidebar.

Is there a way to force Xcode to rebuild it's internal catalog of files so that it can "rediscover" that these files are, indeed, present?

Note, I've tried a fresh "clone" of this Git project as well, same result.

like image 650
EFC Avatar asked Dec 21 '22 18:12

EFC


1 Answers

I found a solution without removing the file from Xcode -

  1. In the Project Navigator, locate the file (colored red for not being found) and highlight it.
  2. Show the File Inspector
  3. Under Location change Absolute Path to Relative to group or Relative to project,
  4. Then next to the path, there's a little white icon, click it and choose the file's location.
like image 121
marmor Avatar answered Jan 20 '23 13:01

marmor