A command-line utility that prints the path of the derived data directory for the current Xcode project.
- Xcode
The xcderiveddata
executable can be run from the command line
from any directory with an Xcode project:
$ find . -name "*.xcodeproj" -maxdepth 1
MyApp.xcodeproj
$ xcderiveddata
~/Library/Developer/Xcode/DerivedData/MyApp-abcdefghijklmnopqr1234567890
Any additional arguments are passed to xcodebuild
,
which can be used to set the target, scheme, and any other other options
for the specified project or workspace:
$ find . -name "*.xc*" -maxdepth 1
MyApp.xcodeproj
MyFramework.xcodeproj
MyWorkspace.xcworkspace
$ xcderiveddata -workspace MyWorkspace.xcworkspace \
-scheme MyFramework
~/Library/Developer/Xcode/DerivedData/MyFramework-abcdefghijklmnopqr1234567890
You can pipe the result of xcderiveddata
into other commands
to automate your build process.
For example,
here's how to locate any xcresult
bundles generated by your test target:
$ xcderiveddata | xargs -I{} find {} -name '*.xcresult'
Run the following command to install using homebrew:
$ brew install nshipster/formulae/xcderiveddata
Run the following commands to build and install manually:
$ git clone https://github.com/NSHipster/xcderiveddata.git
$ cd xcderiveddata
$ make install
MIT
Mattt (@mattt)