Where are the Xcode debug files on Mojave? - xcode

Where are the Xcode debug files for my project located on my Mac running Mojave?

Xcode projects are compiled to its derived data location. You can find the derived data location in Xcode's Location Preferences. The default derived data location is the following:
/Users/YourUsername/Library/Developer/Xcode/DerivedData
If you are trying to find the app you built, it's easier to select the app from the Products folder in the project navigator, right-click, and choose Show in Finder. You can find more detailed information in the following article:
Changing Xcode’s Build Location

Related

In Xcode, how do you re-add the Mac app's product back to the Project navigator?

I accidentally removed from my Xcode Project Navigator the reference to the product of my Mac app target. Is there a way to re-add it to the Project navigator?
(I tried dragging in the actual built app, but that's a reference to that build's specific folder, which isn't the same thing.)
Follow these steps to find the Products directory:
Create a new Finder window, via Cmd+N
Select the Go menu and hold down the option key
You should see Library
Select Library and navigate to the directory below
Try adding this folder to your project navigator:
/Library/Developer/Xcode/DerivedData/[APPLICATION_NAME]-[RANDOMLY-GENERATED_SUFFIX]/Build/Products
Ensure Copy items if needed is not checked
Ensure Create groups is selected
Ensure a target is selected
I hope that helps!

Where does Xcode store archived frameworks?

I created an Xcode project with the "Cocoa Framework" template. When I archive it, it isn't visible in the Organizer.
Where are the archives stored?
Instead of setting custom locations or messing with Xcode's preferences, you could just include a Copy Files Build Phase that should add the archived Framework properly into Organizer.
Using an Absolute Path with the variable$(BUILD_DIR)seems to work fine. You should then find any archives in XCode's Organizer or in:
~/Library/Developer/Xcode/Archives
From Apple ( to view or change archive location ):
Choose Xcode > Preferences, and click Locations.
Choose Custom from the Archives pop-up menu.
Click the folder icon in the text field, and choose a location.
When you go on Xcode Preference :
Archive location : /Users/YourName/Library/Developer/Xcode/Archives

how to find xcode 7.2 .app file location on the mac

I have project in Xcode 7.2 and i need .app file it generates to be able to point it to monkey talk scripts to run test.
i could not find any options to see it.
i was looking in ~/Library/ locations etc.
but no results. is there a way to find build location etc in the Xcode 7.2
The monkey talk target only accepts the .app file
or if there is a way to run mt scripts directly from the installed location on simulator that will help too.
In Xcode if you click on Window -> Organizer you will se a list of build archives. You can right click on then (if there is any of course) and click on Show in Finder. That will be the location of the .xcarchive that contains inside it the dsyms, plists and the .app which I suppose is what you are looking for. In order to archive a build you have to click on Product -> Archive. I hope that helps.
The full path on my machine is /Library/Developer/Xcode/Archives/<#date#>/<#project#>.xcarchive/Products/Application/<#Application#>.app

No derived data for builds after upgrading to Xcode 4.5

I have a MacBook Pro that has Mac OS X 10.7.5. I was doing iOS development using Xcode 4.4 and I recently upgraded to Xcode 4.5.
For my application, I have built some 3rd party libraries that it depends on, and those libraries need to be placed in a certain location so my application can pick them up and use them. However I'm unable to locate the recent builds of the libraries because, even though Xcode says the libraries build successfully, nothing is available for derived data in the Organizer.
What can I do to determine where these libraries are being built?
In Xcode 4.5 look at Preferences->Locations.
This shows where your Derived Data location actually lives on the File System.
Click on the arrow next to the Derived Data path to show the path in the Finder.
I recently upgraded from Xcode 4.3.3 and found that the build location has been automatically changed to Custom, so my (debug) build products are now in:
~/Library/Developer/Xcode/DerivedData/Build/Products/Debug
I am guessing that Apple have made this change to simplify the location of build products in a single location. In Xode 4.3.3 for example build products were placed under:
~/Library/Developer/Xcode/DerivedData/XXX
where XXX is a randomly generated folder based on your Xcode project name.
I have also found it useful to enable hidden folders to be displayed in the Finder so that you can actually browse the contents of your Library folder. I used the free Onyx tool to enable the display of hidden folders.
Hope this is of some help.
I went into Organizer, right clicked on the project which was no longer generating derived data (even though I could see it was... just the delete button was greyed out) and removed it from organizer. When I reopened the project it button was available again

Why doesn't Xcode 4 create any products?

Regardless of build configuration, building my iPad app does not actually output a .app file. It does run in the iPad simulator and on a device, but when I hit build or build and run, the binary appears under Products in red and is not created in the "build" folder as designated in build settings.
Any ideas?
Xcode 4 places its build products and other intermediaries/temporary files/indexes in a derived data directory now instead of a "build" directory that is mixed in with your product files. It does this to deal with the new workspaces and also so that you can have clean builds of different projects in different workspaces without contaminating each other.
If your original template was old, your built product is probably relative to your source directory instead of relative to your built products directory, which is why it's showing up red. By default, your derived data directory will be under ~/Library/Developer/Xcode/DerivedData. To see where your current workspace/project is placing these files, you can File->Workspace Settings... and take a look at the Build Location.
I was having this problem. not only the product .app was red, also simulator wasn't loaded the binary, it was stuck in attaching 'my app'.
i solved it by going to file->project settings. in the tab 'build' changed derived data location to 'project-relative', and in advanced changed build location to 'locations specified by targets'.
with the default options it wasn't possible to run the app, i'm not sure why.
To resolve the issue in XCode 4.x go through following steps :-
Open your project in XCode.
Select .xcodeproj file in XCode project Navigator.
Select the target under the PROJECT Heading. (i.e. the top most target, this target specify your project level build settings)
Now navigate to Build Settings.
Now search for option "Per-Configuration Build Products Path" and update it's value to $(SYMROOT) .

Resources