I want to play a system sound but I don't hear anything:
- (void) play_system_sound
{
NSLog(@"Play system sound");
SystemSoundID soundID;
NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.UIKit"] pathForResource:@"Tock" ofType:@"aiff"];
NSLog(@"path = %@", path );
AudioServicesCreateSystemSoundID((__bridge CFURLRef)[NSURL fileURLWithPath:path], &soundID);
AudioServicesPlaySystemSound(soundID);
AudioServicesDisposeSystemSoundID(soundID);
NSLog(@"Play system sound DONE");
}
I don't hear anything. What am I doing wrong?