Skip to content

[iOS] Vibration.vibrate not working at all #23404

@Miyaguisan

Description

@Miyaguisan

🐛 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(R) Core(TM) 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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions