flutter_vibration icon indicating copy to clipboard operation
flutter_vibration copied to clipboard

Vibrate fails on iOS using custom pattern

Open flyingcircle opened this issue 2 years ago • 16 comments

iOS 16.1.2 iPhone 11

I currently run the following code:

Vibration.vibrate(pattern: [500, 500, 500, 500]);
[hapi]  CHHapticPatternPlayer.mm:132   -[PatternPlayer initWithPlayable:engine:privileged:error:]: ERROR: pattern contains no playable events
Failed to play pattern: The operation couldn’t be completed. (Foundation._GenericObjCError error 0.).

Both Vibration.hasVibrator() and Vibration.hasCustomVibrationsSupport() return true. So this appears like it should work, but instead error is being thrown.

flyingcircle avatar Dec 12 '22 21:12 flyingcircle