From d657e3889ee1eb43fc088478f96a2f76d93a746d Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Fri, 19 May 2017 17:01:36 -0700 Subject: [PATCH] Update iOS HapticFeedback.vibrate implementation (flutter/engine#3702) Use AudioServicesPlaySystemSound instead of AudioServicesPlayAlertSound. This avoids the potential of a system beep on devices without support for haptic feedback. --- .../darwin/ios/framework/Source/FlutterPlatformPlugin.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.mm index 95368abb6c7..0c216b9ae99 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.mm @@ -77,7 +77,7 @@ using namespace shell; } - (void)vibrateHapticFeedback { - AudioServicesPlayAlertSound(kSystemSoundID_Vibrate); + AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); } - (void)setSystemChromePreferredOrientations:(NSArray*)orientations {