gdelataillade / alarm

A Flutter plugin to easily manage alarms on iOS and Android
https://pub.dev/packages/alarm
MIT License
132 stars 86 forks source link

Vibration Not Working on iOS Devices #289

Closed synstin closed 3 days ago

synstin commented 5 days ago

Alarm plugin version 4.0.12

Describe the bug The vibration feature is not working on iOS devices when the timer ends, despite vibrate being set to true. The issue occurs regardless of the device's silent mode status. However, the vibration works correctly on Android devices.

My notification sound is a short beep sound that lasts about 1 second. The loopAudio setting is currently set to false.

To Reproduce Steps to reproduce the behavior:

  1. Set vibrate to true in settings
  2. Start a timer on an iOS device
  3. Wait for the timer to complete
  4. Observe that no vibration occurs
  5. Test the same steps on Android to confirm vibration works properly

Expected behavior When the timer ends, the iOS device should vibrate, just as it does on Android devices.

Additional context

gdelataillade commented 4 days ago

Hi @synstin

I tried to reproduce the issue following your steps in the iOS example app but the device vibrated as expected. Do you also have the issue with the example app ? If yes, then is your app in the background or your device locked when alarm starts ringing ?

synstin commented 3 days ago

After checking, the haptic option in the iOS device's Sound & Haptics settings was set to "Off." When I changed it to "Always On," the vibration now works normally. Thank you!