Home > Blockchain >  How can I move an XCode project when files are located in multiple folders?
How can I move an XCode project when files are located in multiple folders?

Time:10-12

I have an XCode project that has files that are located in multiple folders around my hard drive. When I created the project several years ago I borrowed classes from other projects but I didn't import them correctly. Is there a way to export the entire project moving all the necessary files with it? I need to move the project to another machine.

CodePudding user response:

Basically, you've discovered why keeping Xcode project files outside the project folder can be a bad idea. There isn't an automatic way, if that's what you're asking. You will just have fix the references yourself.

You could do this passively: move the project folder, watch the references break, and fix them by finding the files, copying them into the project folder, and remaking the references.

Alternatively, look at the text of the project file and find the external references. Drill down to the pbxproj file, open it in a text editor, and look for "path =" where the path is absolute or is relative with an initial climb out of the project file. For example:

path = ../../jack.jpg

That's a reference to an external file.

  • Related