Use a Lucent library
Install it with npm: lucent build compiles its modules with the app's, with their pods, dependencies and permissions.
npm i lucent-hapticsimport { ImpactFeedbackStyle, impactAsync } from "lucent-haptics";
await impactAsync(ImpactFeedbackStyle.Heavy);lucent build finds every Lucent package the app depends on, directly or not, and compiles its modules with the app's. Rebuild the app afterwards, after pod install on iOS.
- The package's pods, Gradle dependencies and permissions come with it.
Info.plistentries it needs are added by the Expo config plugin. In a bare app,lucent buildnames each missing key:trip-tracker needs NSLocationWhenInUseUsageDescription in ios/App/Info.plist.- A package that doesn't support your Lucent version fails the build, and
lucent doctorsays which. - Lucent code can import a package's module too:
import { impactAsync } from "lucent-haptics/src/haptics.lucent".