Clicky

iOS Dev Nugget 266 Play a System Sound for Simple Untethered Debugging

.

Need to run a code review on your codebase? Hire me

Sometimes we want a simple confirmation if a line of code has been reached, especially when we need to test on device, untethered. One trick I like to use is to play a system sound:

import AudioToolbox

AudioServicesPlaySystemSound(1109)

Of course, if you are tethered, you can use a breakpoint to play a sound.

Your feedback is valuable: Do you want more nuggets like this?   Yes   or   No

.

.

Like this and want such iOS dev nuggets to be emailed to you, weekly?

Sign Me Up! or follow @iosdevnuggets on Twitter

.

View archives of past issues