Here is how I play a sound in my app
NSString *path = [NSString stringWithFormat:@"%@%@", [[NSBundle mainBundle] resourcePath], @"/sound.wav"];
SystemSoundID soundID;
NSURL *filePath = [NSURL fileURLWithPath:path isDirectory:NO];
AudioServicesCreateSystemSoundID((__bridge CFURLRef)filePath, &soundID);
AudioServicesPlaySystemSound(soundID);
The code above works well in simulator, but not on device. Can you recommend me a simple
way to play sound ? I know about AVAudioPlayer, but I’m looking for something simpler. Like the code above.
This is how I do it and it works fine both on Simulator and real Device
Hope this helps