The ZBar iPhone SDK doesn't automatically play a sound on successful scan. It's not hard to play one yourself, though:
- Add a sound file you want played to your app, I called mine 'beep.mp3'.
- Add the AudioToolbox framework to your project.
In header file:
#import <AudioToolbox/AudioServices.h>
Setup (possibly in viewDidLoad):
SystemSoundID soundID;
CFBundleRef mainBundle = CFBundleGetMainBundle();
CFURLRef ref = CFBundleCopyResourceURL(mainBundle, (CFStringRef)@"beep.mp3", NULL, NULL);
AudioServicesCreateSystemSoundID(ref, &soundID);
self.soundID = soundID;
Play sound:
AudioServicesPlaySystemSound(self.soundID);