1.手机震动(在iphone有作用,在ipad上没有作用)
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
2.播放铃声
SystemSoundID soundId;
NSString *path = [[NSBundle mainBundle]pathForResource:@“ring”1 ofType:@"aiff"];
AudioServicesCreateSystemSoundID((__bridge CFURLRef)[NSURL fileURLWithPath:path], &soundId);
AudioServicesPlaySystemSound(soundId);