Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@cutls/expo-haptics

expo26MIT12.6.6TypeScript support: included

Provides access to the system's haptics engine on iOS and vibration effects on Android.

react-native, expo, expo-haptics, haptics

readme

expo-haptics

Provides access to the system's haptics engine on iOS and vibration effects on Android.

API documentation

Installation in managed Expo projects

For managed Expo projects, please follow the installation instructions in the API documentation for the latest stable release.

Installation in bare React Native projects

For bare React Native projects, you must ensure that you have installed and configured the expo package before continuing.

Add the package to your npm dependencies

npx expo install expo-haptics

Configure for iOS

Run npx pod-install after installing the npm package.

Configure for Android

No additional set up necessary.

This module requires permission to control vibration on the device, it's added automatically.

<!-- Added permissions -->
<uses-permission android:name="android.permission.VIBRATE" />

Contributing

Contributions are very welcome! Please refer to guidelines described in the contributing guide.

changelog

Changelog

Unpublished

🛠 Breaking changes

🎉 New features

🐛 Bug fixes

💡 Others

12.6.0 — 2023-09-04

🎉 New features

  • Added support for React Native 0.73. (#24018 by @kudo)

12.5.0 — 2023-08-02

This version does not introduce any user-facing changes.

12.4.0 — 2023-06-21

🐛 Bug fixes

12.3.0 — 2023-05-08

This version does not introduce any user-facing changes.

12.2.1 — 2023-02-09

This version does not introduce any user-facing changes.

12.2.0 — 2023-02-03

💡 Others

  • On Android bump compileSdkVersion and targetSdkVersion to 33. (#20721 by @lukmccall)

12.1.0 — 2022-12-30

🎉 New features

12.0.1 — 2022-11-03

🐛 Bug fixes

  • Fixed rare crash on iOS when using Feedback Generator's API not on the main thread. (#19819 by @AntonGolikov)

12.0.0 — 2022-10-25

🛠 Breaking changes

  • Bumped iOS deployment target to 13.0 and deprecated support for iOS 12. (#18873 by @tsapeta)

11.3.0 — 2022-07-07

💡 Others

  • Migrated Expo modules definitions to the new naming convention. (#17193 by @tsapeta)

11.2.0 — 2022-04-18

🎉 New features

  • Use JSI host object instead of the bridge module for communication between JavaScript and native code. (#16972 by @tsapeta)

⚠️ Notices

  • On Android bump compileSdkVersion to 31, targetSdkVersion to 31 and Java version to 11. (#16941 by @bbarthec)

11.1.1 - 2022-02-01

🐛 Bug fixes

  • Fix Plugin with id 'maven' not found build error from Android Gradle 7. (#16080 by @kudo)

11.1.0 — 2021-12-03

💡 Others

  • Removed legacy Objective-C implementation and changed the pod name to ExpoHaptics. (#15083 by @tsapeta)
  • Simplified iOS implementation with enums as argument types. (#15129 by @tsapeta)

11.0.1 — 2021-10-01

This version does not introduce any user-facing changes.

11.0.0 — 2021-09-28

🛠 Breaking changes

🐛 Bug fixes

  • Fix building errors from use_frameworks! in Podfile. (#14523 by @kudo)

10.2.0-alpha.0 — 2021-08-17

💡 Others

  • Migrated from @unimodules/core to expo-modules-core. (by @tsapeta)
  • Experimental Swift implementation using Sweet API. (by @tsapeta)
  • Rewrote from Java to Kotlin. (#13611 by @M1ST4KE)

10.1.0 — 2021-06-16

🐛 Bug fixes

💡 Others

  • Build Android code using Java 8 to fix Android instrumented test build error. (#12939 by @kudo)

10.0.0 — 2021-03-10

🛠 Breaking changes

  • Dropped deprecated notification, impact, selection methods. (#11907 by @EvanBacon)

🎉 New features

  • Updated Android build configuration to target Android 11 (added support for Android SDK 30). (#11647 by @bbarthec)

9.0.0 — 2021-01-15

🛠 Breaking changes

8.4.0 — 2020-11-17

This version does not introduce any user-facing changes.

8.3.0 — 2020-08-18

This version does not introduce any user-facing changes.

8.2.1 — 2020-05-29

This version does not introduce any user-facing changes.

8.2.0 — 2020-05-27

This version does not introduce any user-facing changes.