I have a simple code to play sound through AVAudioPlayer
NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle]
pathForResource:@"beep"
ofType:@"mp3"]];
self.player = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:nil];
self.player.volume = 1;
[self.player prepareToPlay];
My exception checkpoint will stop at prepareToPlay, and the console log wrote:
ERROR: AVAudioSessionUtilities.h: 111: GetProperty: Error AudioSessionGetProperty ('prp?') With error: 'pty?
After double-clicking to go through this breakpoint, the application will not crash. This happened only in the simulator. Any suggestions?
source
share