1.工程文件->build phases ->link binary with libraries 导入 AVF
2.#import <AVFoundation>
-
NSString *path = [[NSBundle mainBundle] pathForResource:@"enemy3_down.mp3" ofType:nil];
_bombAudioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:nil];
_bombAudioPlayer.numberOfLoops = 1;
[_bombAudioPlayer play];