transfer files from one xcode project to another

I created a new xcode project and dragged files from old project to new project. The new project compiles fine. On looking through Finder, I see some of the files are physcially not transfered from old xcode project directories to new xcode project directories. New project is still pointing to old project source code. How to physcally move them. I am working on xcode 9.2

Answered by KMT in 301667022

Those files are (re)generated after a successful build to a device.


Xcode shows only the .app built for the device in the Products folder. So if you option-clean the product and then build for Simulator, it will still be red. If you build for the device, Xcode will show it and "show in finder" should also work

If you're new to the process, you should be very careful juggling project files. How you do that can depend on your workflow, how often you expect to need this done, do you have backups you routinely pull from etc. Once you settle on a process, plan on sticking with it.


Xcode works with paths, and as you've found, things can get complicated easily.


Do you want to move the original files from their original locations, or work with copies in a new location?


>and dragged files from old project to new project.


Does that mean you dragged them in the Finder, or dragged them from one open project into another via Xcode?


Seems to be recently discussed here: https://stackoverflow.com/questions/4414181/moving-files-into-a-real-folder-in-xcode/4425148#4425148


You might want to practice on a couple of throw away projects while learning.


Finally, when doing any of this, follow up with an option-clean build folder on the new project. Use Xcodes' Product menu w/the option-key pressed, then select to 'clean build folder'. This encourages Xcode to let go of outdated, indexed references, etc. and pay attention to the new changes.


Good luck.

transfer files from one xcode project to another
 
 
Q