PDA

View Full Version : Invisible Build Folders?




Senor Cuete
Aug 8, 2012, 07:48 PM
In earlier versions of XCode the folders in which the builds were done were in the project directory. In XCode4 these have disappeared. In the project and target build settings the builds are supposed to be in project/build/Debug and Release. According to Quick Help for build settings: "The path at which all products will be placed when performing a build. Typically this path is not set per target, but is set per-project or per-user. By default, this is set to $(PROJECT_DIR)/build. [SYMROOT]". I need to access these to make sure that dragging and dropping the application's file type to launch the app, etc. will work with my sandbox entitlements correctly. My guess is that XCode 4 makes these invisible. I can't figure out how to make them visible using the finder or by using XCode behaviors or preferences.

In older versions of XCode I could build an unlocked app and put it in my applications folder to test it but in XCode 4 / OS X 10.7, when I double click on a file in the app's native file format it will open the app in the (invisible?) build folder.

How can I access these folders?



Red Menace
Aug 8, 2012, 08:47 PM
The default location for the builds is your user's ~/Library/Developer/Xcode/DerivedData folder. You can also right-click on the product and show it in the Finder.

jamawa
Aug 9, 2012, 04:17 AM
You can change the location of the build folders in Xcode's preferences; the tab 'Locations' allows you to change the location. If you'd like the folders to reside in your product folder, change the options of 'Derived Data' to 'Relative' and your preferred name of the folder, f.e. 'Build'.

Senor Cuete
Aug 9, 2012, 09:05 AM
The default location for the builds is your user's ~/Library/Developer/Xcode/DerivedData folder. You can also right-click on the product and show it in the Finder.

There is no Library folder in my username folder. The finder can't find a DerivedData folder so am I right in assuming that these are hidden? If so how can I un-hide them?

aarond12
Aug 9, 2012, 09:48 AM
There is no Library folder in my username folder. The finder can't find a DerivedData folder so am I right in assuming that these are hidden? If so how can I un-hide them?
There IS a Library folder in your username folder... Lion (and later) hides it. Either use "Go to Folder" and go to "~/Library" or hold down your option key and click on the Go menu and it will show up.

Senor Cuete
Aug 11, 2012, 08:34 AM
Thanks for your help. I never changed the build location so obviously quick help in XCode is wrong where it says that that it still stores the builds in project/build. Also if what you wrote was quoted from the documentation then it's wrong as well. XCode is saving the builds of my app in ~/Library/Developer/XCode/DerivedData/Appname-hkjlvhmirshcnhesgvusrbzzbezi/Build/Products/ .

Holding the option key down and clicking on the Go menu does nothing different than just clicking on the Go menu on my machine.

Red Menace
Aug 11, 2012, 09:45 AM
Xcode is saving your build data in the build folder in the default Derived Data location for the project (project/build). As already mentioned, you can see and change the location from Xcode > Preferences > Locations.

Pressing the option key when using the Finder's Go menu just adds the (normally invisible) ~/Library folder to the list. As already mentioned, you can also use the Go To Folder menu item and manually enter a folder path. Options for later use include making the ~/Library folder visible or adding it to the Finder's Sidebar.

chown33
Aug 11, 2012, 10:54 AM
Holding the option key down and clicking on the Go menu does nothing different than just clicking on the Go menu on my machine.
That's something I've never seen or heard of.

Exactly what Mac model and OS version are you using?

If you click the Finder's Go menu only once, it should drop down and remain down. Pressing and releasing the modifier key should cause the "Library" folder menu-item to appear and disappear dynamically. This is how it works on every Mac I've ever seen or used.

Try pressing all the various modifier keys, one at a time, with the Go menu extended. The "option" modifier key may be labeled "alt", depending on the keyboard.

Senor Cuete
Aug 11, 2012, 12:01 PM
Xcode is saving your build data in the build folder in the default Derived Data location for the project (project/build).


No, the default location is not project/build, it's ~/Library/Developer/XCode/DerivedData/Appname-hkjlvhmirshcnhesgvusrbzzbezi/Build/Products/.

I see that holding the option key down adds the Library folder.

Red Menace
Aug 11, 2012, 01:12 PM
No, the default location is not project/build, it's ~/Library/Developer/XCode/DerivedData/Appname-hkjlvhmirshcnhesgvusrbzzbezi/Build/Products/

When you see the "project/build" in the build settings, that is referring to the build folder in the current location for the project's derived data, e.g. $(PROJECT_DIR)/build, which by default is the location you are seeing. The effective path can be seen in the Locations preference.

Senor Cuete
Aug 12, 2012, 05:38 PM
When you see the "project/build" in the build settings, that is referring to the build folder in the current location for the project's derived data, e.g. $(PROJECT_DIR)/build, which by default is the location you are seeing. The effective path can be seen in the Locations preference.

Thanks. When I "upgraded" to this version of XCode it not only moved the builds to the derived data location but also deleted the projectname/Build folder.