检测iphone 是不是震动模式 并播放音频文件
if (![AVAudioSessionPortHeadsetMic isEqualToString:[[AVAudioSession sharedInstance] category]] && ![RecorderManager sharedManager].isRecording)
{
SystemSoundID soundToPlay;
NSString *path = [[NSBundle mainBundle] pathForResource:@"messagein" ofType:@"caf"];
NSURL *pathURL = [NSURL fileURLWithPath : path];
AudioServicesCreateSystemSoundID((__bridge CFURLRef) pathURL, &soundToPlay);
//playback
AudioServicesPlaySystemSound(soundToPlay);
}else
{
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
}