Xcode DerivedData folder

2019-02-25 05:11发布

问题:

I have a short question about understanding where Xcode puts the products of my programs. I deleted the DerivedData folder out of the project's folder completely.

First question: What is DerivedData actually for and what exactly is ModuleCache?

However, when compiling, I find the product somewhere in Library->Developer->Xcode->DerivedData on my iMac whereas on my Mac Book Air it recreates the DerivedData folder with all the stuff inside and puts in in the project's folder.

Thanks for your explanations;)

PS: I'm using the latest Xcode 6 from the AppStore, not any Beta Version.

回答1:

Derived data contains the files Xcode creates when it builds your project. If you have an application project, the application is one of the files Xcode creates. Other examples of derived data include object files the compiler creates out of your source code files and code coverage files.

The default location of the DerivedData is the following location:

/Users/YourUsername/Library/Developer/Xcode/DerivedData

If your MacBook Air is using your project's folder, it's because either Xcode or the project was set to use the project folder instead of the default location for the DerivedData folder. The first place to go to switch the DerivedData folder location is in Xcode's Locations preferences. Setting the location from Xcode's Locations preferences sets the DerivedData location for all future Xcode projects.

If your project still is using the project folder for DerivedData, choose File > Project Settings in Xcode. From there you can change the DerivedData location for your project.



标签: xcode6