导入AudioToolbox.framework包在swift文件中 import AudioToolboxAudioServicesPlaySystemSound(SystemSoundID.convertFromIntegerLiteral(UInt32(kSystemSoundID_Vibrate)))