benjamindean / flutter_vibration

Handle vibration on iOS and Android in Flutter apps
229 stars 69 forks source link

iOS : Conflict with SystemSound.play(SystemSoundType.click) #76

Open john990 opened 2 years ago

john990 commented 2 years ago

Hi, Vibration doesn't work when used with SystemSound, works fine when used alone.

Not Work:

SystemSound.play(SystemSoundType.click);
Vibration.vibrate(pattern: [10, 12, 10, 12], intensities: [1, 100]);


Work fine:

Vibration.vibrate(pattern: [10, 12, 10, 12], intensities: [1, 100]);

flutter doctor:

[✓] Flutter (Channel stable, 3.0.0, on macOS 12.0.1 21A559 darwin-x64, locale zh-Hans-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] IntelliJ IDEA Community Edition (version 2020.3.3)
[✓] VS Code (version 1.66.0)
[✓] Connected device (4 available)