TIL how to auto-move Xcode DEBUG builds to Applications

TIL a neat Xcode trick!

So my apps contain app intents. Those won’t show up in Shortcuts unless the app is anywhere in /Applications. For months now I’ve been using a post-build scheme script to move the DEBUG build there, w/ a symlink to the app in its original place in derived data.

This worked well but was a whole thing because I had to make sure cleaning the build would wipe the moved app etc.

Turns out I overthought it! All I needed to do was to add this in the right .xcconfig:

DEPLOYMENT_LOCATION = YES
DSTROOT = /Applications/Dev Builds
INSTALL_PATH = /

Now Xcode takes care of all the things, I don’t need those scripts anymore, and Xcode even correctly cleans the built when necessary.

So that’s that. The more you know!

Carlo Zottmann @czottmann

👋🏼 Oh hello!

Sorry to be a bother, but did you know I make quite useful Shortcuts-related macOS & iOS apps?

Check them out!