Changing Xcode’s Build Location
August 17th, 2015
I covered this topic in the Xcode 4: Finding the Application You Built post, but I’ve answered this question twice online this week so I’m writing about it again.
When you build a project in Xcode, Xcode places the files it creates, such as your application file, in a derived data folder. This derived data folder is Xcode’s build location. The default location of the derived data folder is the following directory:
Xcode creates a folder for your project inside this folder and places the files it creates during the build in that folder. Keep in mind there are more directories to go through to find your application. If you want to find your application, it’s easier to select your application from the Products folder in the project navigator (It’s on the left side of the project window), right-click, and choose Show in Finder.
Why does Xcode place the derived data in a central location instead of in a folder inside your project folder? Version control. Version control systems create a repository inside your project folder. The derived data files should not be under version control. Placing your derived data outside the project folder simplifies working with version control.
What do you do if you don’t like Xcode’s default derived data location? Change the location. Use Xcode’s Locations preferences to change the derived data location for all future Xcode projects you create.
The changes you make in Xcode’s Locations preferences do not apply to existing projects. To change the derived data location of a single project, choose File > Project Settings in Xcode.