The sound is not playing for
- iOS 6 iPhone 5
- iOS 5 iPhone 4
but working fine on iPad 2 and iPhone 3GS
What can be wrong here, same code is working for few device but not for all.
I call the above function when I scan the barcode in my sample app.
- iOS 6 iPhone 5
- iOS 5 iPhone 4
but working fine on iPad 2 and iPhone 3GS
Code:
- (void)playSound
{
// read the sound file from resources and play it on successful scanning
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"scan_beep" ofType:@"wav"];
NSURL *fileURL = [NSURL fileURLWithPath:filePath];
AudioServicesCreateSystemSoundID((CFURLRef)fileURL, &systemSoundID);
AudioServicesPlayAlertSound(systemSoundID);
}
What can be wrong here, same code is working for few device but not for all.
I call the above function when I scan the barcode in my sample app.