Durdu
Durdu

Reputation: 4849

How to get xcode derived data path

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)

Upvotes: 16

Views: 18215

Answers (2)

Sarabjit Singh
Sarabjit Singh

Reputation: 1824

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

Upvotes: 5

vadian
vadian

Reputation: 285220

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.

Upvotes: 21

Related Questions