1. 引入头文件: #import <AVFoundation/AVFoundation.h> 2. 添加如下代码: [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];