I came across a Terminal one-liner for Xcode 3 that made it play the Inception "BWAAAAHNN" sound every time I tried to compile and hit an error. It worked great as a mistake deterrent, because nobody wants to be startled by that sound EVER.
Anybody know how this was done? Would it still work in Xcode 4?
Edit: thanks to Justin's hint (Preferences > Behaviors > Build Fails > Play Sound) I worked out 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>'
It's a little more than 1 line, though I'm not sure if that third line is needed (Xcode seems to keep two versions of behaviour settings?). Also, I picked a different sound this time. :)
In Xcode 4, they are Behaviors.
Preferences > Behaviors > Build Fails > Play Sound
or Build Generates New issues
As far as irritating, a behavior can also speak to you, or open and close your project's views, and more, and you can combine them O_O.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With