I am trying to debug another developer's iPhone project. I am using XCode 4.2 on Mac OS X Lion.
Now, when I try to compile the project, I get an error saying that some files are missing. These files are shown red in the Project Navigator. However, I am unable to find the original path where these files are supposed to be.
For example, let say the project name is Project1. A developer had a folder with shared libraries outside this project's folder and he used them in his project. When I load the project in XCode, I can see that there is another folder there called SharedLibs, but all files inside of it are red (as that folder is missing from my hard drive).
Is there a way to click on red files or something to find out their original path? As the missing files are general 3rd party libraries, I want to create the folder in the correct path and to fill it with the missing libraries.
Thanks in advance for any help.
Best Answer
You can right-click any element and select Show in Finder. It will display the best possible match that exists, e.g. the immediate parent folder if only the file is missing, its parent folder if the immediate parent folder is missing, etc.
Alternatively, you can use Xcode's AppleScripting capabilities to determine the full path of items in your project.
Open AppleScript Editor and paste the following:
Change the project name (
"Fooo"
) and run it, and, check the output. It will contain the full paths to all items traversed. It depends on your project structure though -- it will only traverse groups (folders) of the top four levels and their file/folder references.This is the output for a newly created Cocoa Application project named
Cocoa
:You can of course adjust the script to your project's structure, and traverse the item hierarchy to the missing items. In this case, the file's full path is displayed as output in AppleScript.