question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[iOS] Vibration.vibrate not working at all

See original GitHub issue

🐛 Bug Report

Using Vibration.vibrate produces the following results:

TypeError: undefined is not an object (evaluating 'RCTVibration.vibrate') in MyComponent (at ComponentWrapper.js:27) in WrappedComponent (at renderApplication.js:32) in RCTView (at View.js: 43) in RCTView (at VIew.js: 43) in AppContainer (at renderApplication.js: 31)

Screenshot

To Reproduce

Simply add Vibration.vibrate() at convenient location then test on iOS on RN 0.56.0

Expected Behavior

The device should vibrate

Code Example

Snack

Environment

React Native Environment Info:

  • System:
    • OS: macOS 10.14.3
    • CPU: x64 Intel® Core™ i5-6500 CPU @ 3.20GHz
    • Memory: 11.24 GB / 24.00 GB
    • Shell: 5.3 - /bin/zsh
  • Binaries:
    • Node: 10.14.1 - ~/.nvm/versions/node/v10.14.1/bin/node
    • Yarn: 1.12.3 - /usr/local/bin/yarn
    • npm: 6.4.1 - ~/.nvm/versions/node/v10.14.1/bin/npm
    • Watchman: 4.9.0 - /usr/local/bin/watchman
  • SDKs:
    • iOS SDK:
      • Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
    • Android SDK:
      • Build Tools: 27.0.3, 28.0.3
      • API Levels: 27, 28
  • IDEs:
    • Android Studio: 3.3 AI-182.5107.16.33.5264788
    • Xcode: 10.1/10B61 - /usr/bin/xcodebuild
  • npmPackages:
    • react: 16.6.3 => 16.6.3
    • react-native: 0.56.0 => 0.56.0
  • npmGlobalPackages:
    • react-native-create-library: 3.1.2

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
baughmanncommented, Jan 20, 2020

This is still not working on iOS, though no exception is thrown for me. Vibration.vibrate() yields no feedback whatsoever.

7reactions
thetwosentscommented, May 6, 2019

Can confirm, doesn’t work on most recent react-native also. Same error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

My iPhone Doesn't Vibrate! Here's The Real Fix.
It's possible that your iPhone doesn't vibrate because you've set your vibration pattern to None. Open Settings and tap Sounds & Haptics -> ......
Read more >
Top 7 Fixes for Vibration Not Working on iPhone - Guiding Tech
1. Enable Vibration · 2. Check Vibration Pattern · 3. Check Accessibility Settings · 4. Turn Off Do Not Disturb · 5. Restart...
Read more >
Vibration not working even if Silence mod… - Apple Community
If vibration is enabled, try these steps next: Tap Settings > Sounds & Haptics > disable both "Vibrate on Ring" and "Vibrate on...
Read more >
iPhone vibration not working? 9 Real fixes - iGeeksBlog
iPhone vibration not working? 9 Real fixes ; Open Settings. Select Sounds & Haptics. Enable Vibrate to Ring. ; Open Settings → Sound...
Read more >
[Solved] iPhone Not Vibrating? Here is the Fix - iMobie
Solutions to iPhone Not Vibrating · 1. Toggle iPhone Silent Switch · 2. Check Whether Vibrate is Enabled on Silent/Ring · 3. Force...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found