Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get xcode derived data path

Tags:

xcode

Is there a way I can retrieve through some bash command the path to the Xcode DerivedData folder?

usually it is something like

/Users/ThisGuy/Library/Developer/Xcode/DerivedData/*

and I can replace it with

/Users/$USER/Library/Developer/Xcode/DerivedData/*

but this doesn't guarantee that the path to the derived data location is actually this one (the user may have changed it to a relative or a custom one)

like image 688
Durdu Avatar asked Feb 20 '18 13:02

Durdu


People also ask

How do I open derived data in Xcode?

Another one here is Opening Derived Data folder to access you project binaries or to do any thing else. Either you should know the path to Derived data folder and go to Finder Cmd + Shift + G and then enter the path. Or you have to go to Xcode preferences -> Location Tab click on arrow in front of Derived Data path.

How do I delete derived data Xcode 13?

Delete Derived Data Choose Window -> Organizer. Select the Projects tab. Select your project on the left. Next to the Derived Data line, there click the Delete button.

Should I delete derived data Xcode?

The place where a large number of files were created this way is the DerivedData folder. Its size can be from a few hundred MB to dozens of GB. Luckily, you're fine with deleting files in this folder. There will be no consequences to this action and the benefit you will gain is more space on your Mac.


2 Answers

You could get the value for key IDECustomDerivedDataLocation from user defaults.

defaults read com.apple.dt.Xcode.plist IDECustomDerivedDataLocation

If the line returns

The domain/default pair of (com.apple.dt.Xcode.plist, IDECustomDerivedDataLocation) does not exist

it's the default path ~/Library/Developer/Xcode/DerivedData/ otherwise the custom path.

like image 173
vadian Avatar answered Oct 04 '22 15:10

vadian


Hi you need to open xCode preferences from menu and follow the following instructions: To open derived data location

like image 20
Sarabjit Singh Avatar answered Oct 04 '22 15:10

Sarabjit Singh