1.1系统提示音创建
<span style="white-space:pre"></span><p style="margin-top: 0px; margin-bottom: 0px; font-size: 18px;"><span style="font-family:KaiTi_GB2312;"><span style="color: rgb(112, 61, 170);">SystemSoundID</span> receiveSound;</span></p>
NSString *soundPath = [[NSBundle mainBundle] pathForResource:@"receive_msg"
ofType:@"caf"];
NSURL *soundURL = [NSURL fileURLWithPath:soundPath];
OSStatus err = AudioServicesCreateSystemSoundID((__bridge CFURLRef)soundURL,
&receiveSound);
1.2 系统提示音播放
//播放声音
AudioServicesPlaySystemSound(receiveSound);
2.1 震动提示
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);