I run the following code on a simulator and I get no sound:
NSString *soundPath = [[NSBundle mainBundle] pathForResource:@"pageflip" ofType:@"mp3"]; NSURL *soundUrl = [NSURL fileURLWithPath:soundPath]; AudioServicesCreateSystemSoundID((__bridge CFURLRef) soundUrl, &_soundEffect); AudioServicesPlaySystemSound(_soundEffect);
The code has been successfully tested on xCode 5 and iOS 7. Libraries are imported as needed.
I started soundPath and returned the correct location on the file system.
Has anyone encountered a similar problem?
source share