iOS端
全版本通用的震动,通过苹果私有API实现
//peek AudioServicesPlaySystemSound(1519); //pop AudioServicesPlaySystemSound(1520); //连续三次短震动 AudioServicesPlaySystemSound(1521); //大约时长1s震动 AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
在iOS10以后,苹果新增了一套震动反馈的API,但仅支持iPhone7之后有虚拟home键的设备
if([str isEqual: @