Inconsistent HapticFeedback on iOS #25284
Labels
platform/iOS 🍎
s/needs-attention
Issue has more information and needs another look
t/bug
Something isn't working
Description
The issue is with
HapticFeedback.Default.Perform
. On iOS it works or not depending on what code follows this line. Sometimes with some chance. For example:The situation getting worse when you try to use haptic feedback in a more complex situation, like this:
In this case it just can have zero vibrations, vibrate only once or vibrate twice as you expect.
Let us keep this bug report for a while just to see if people have the same issues with haptic feedback. Because googling of "MAUI inconsistent haptic feedback" returns nothing.
What I tried:
HapticFeedback.Default.Perform
from main thread viaMainThread.BeginInvokeOnMainThread
/InvokeOnMainThreadAsync
.HapticFeedback.Default.Perform
via "run and forget" usingTask.Run()
.Don't see this issue on Android. On iOS both
Click
andLongPress
have this problematic behavior.Steps to Reproduce
Wasn't able to reproduce in the clean MAUI project, since behaviour depends on the code which follows haptic feedback usage. Without it it works fine. I will update the bug report if I will find a way to reproduce it.
Link to public reproduction project repository
No response
Version with bug
8.0.40 SR5
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 17.6.1
Did you find any workaround?
So far the only workaround I found is to place
await Task.Delay()
afterwards with at least 100 ms to make the vibration stable.Relevant log output
No response
The text was updated successfully, but these errors were encountered: