I came across a single-line terminal for Xcode 3, which caused it to play an Inception "BWAAAAHNN" sound every time I tried to compile and hit an error. He coped with the error perfectly, because no one wants this sound to sound literally EVER.
Does anyone know how this was done? Will it work in Xcode 4?
Edit: thanks to Justin's hint (Preferences> Behavior> Build Failure> Play Sound) I designed this:
curl http://www.freesound.org/data/previews/73/73581_634166-lq.mp3 -o /Developer/Extras/trombone.mp3 defaults write com.apple.dt.Xcode "Xcode.AlertEvents.4_1" -dict-add "Xcode.AlertEvent.BuildFails" '<dict><key>Xcode.Alert.Sound</key><dict><key>enabled</key><true/><key>soundPath</key><string>/Developer/Extras/trombone.mp3</string></dict></dict>' defaults write com.apple.dt.Xcode "Xcode.AlertEvents" -dict-add "Xcode.AlertEvent.BuildFails" '<dict><key>Xcode.Alert.Sound</key><dict><key>enabled</key><true/><key>soundPath</key><string>/Developer/Extras/trombone.mp3</string></dict></dict>'
This is a little more than 1 line, although I'm not sure if this third line is needed (Xcode seems to support two versions of behavior settings?). This time I chose a different sound. :)
source share