Integrate Luciq with Expo
This page covers the recommended way to install and configure the Luciq SDK in your Expo application using the Expo Plugin system.
Overview
Luciq supports modern Expo development. The recommended way to install Luciq is by using our Expo Plugin, which automatically handles native project configuration and automates the sourcemap uploading process for your standard builds.
Recommended Setup: Using the Expo Plugin
This is the simplest and most robust way to integrate Luciq into an Expo project.
Install the SDK
In your project directory, install the Luciq SDK.
npm install @luciq/react-nativeyarn add @luciq/react-nativeConfigure the Expo Plugin
Add the @luciq/react-native plugin to the plugins array in your app.json file.
{
"expo": {
"plugins": [
[
"@luciq/react-native",
{
"addScreenRecordingBugReportingPermission": true //check note below
}
]
]
}
}The addScreenRecordingBugReportingPermission is an optional helper that automatically adds the required microphone and photo library permissions on iOS and the foreground service permission on Android for the screen recording feature.
Rebuild Your App
After adding the plugin, rebuild your app's native directories for the changes to take effect.
npx expo prebuildInitialize the SDK
Import and initialize Luciq in your app's main file (e.g. App.js):
import Luciq, { InvocationEvent } from '@luciq/react-native';
Luciq.init({
token: 'APP_TOKEN',
invocationEvents: [InvocationEvent.shake],
});You can find your app token by selecting SDK Integration in the Settings menu from your Luciq dashboard.
Automatic Sourcemap Uploads
A key benefit of using the Expo Plugin is that it automatically handles sourcemap uploads for all your standard Expo builds (eas build). By adding the plugin to your app.json, it will detect your builds and upload the correct sourcemaps to Luciq with no additional configuration required.
OTA updates (expo-updates)
Supported
Luciq.setOverAirVersion() attaches the active OTA update identifier to all events:
Once set, every report, crash, and APM span carries the update version.
Enriching with channel, runtime version, and emergency-launch state
These fields are not auto-collected. Add them as user attributes and tags so you can filter on them in the dashboard:
Call this once after Luciq.init(), ideally inside your root component or in App.tsx.
Expo execution environment context (expo-constants)
Expo Constants metadata (Expo Go vs standalone vs bare, EAS project ID, app config name/version, SDK version) is not collected automatically. Forward it as user attributes:
Expo Router (expo-router)
Supported
Screen-load APM spans fire automatically when a route renders, regardless of whether you got there via router.push, router.replace, or a deep link. No extra code is needed - this is part of the standard navigation integration.
Tracking router.prefetch()
router.prefetch() does not surface in screen-load timings because no screen mounts. To measure prefetch cost, wrap it with a custom APM span:
Use useTracedRouter() instead of useRouter() anywhere you call prefetch.
Image and asset loading (expo-image, expo-asset)
Network requests for images are already captured by Luciq's network logger. The cache and decoding work that happens after the request - which is what Image.prefetch, Image.loadAsync, and Asset.loadAsync do - is not auto-instrumented.
To time these calls, wrap them with custom spans:
The same pattern applies to Image.loadAsync and Asset.loadAsync. Keep span names stable so they aggregate cleanly in the APM dashboard.
EAS Build pipeline visibility
EAS builds run on remote infrastructure outside the app, so the SDK cannot observe them. There is no Luciq-side hook for eas-build-pre-install, eas-build-on-success, or eas-build-on-error.
Legacy: Using a Custom Development Client
For older managed workflows that do not use the Expo plugin system, you will need to use Expo’s custom development client.
Run the dev client package install:
Modify your package.json scripts to use the --dev-client flag for the start command.
Proceed with the Luciq SDK installation and initialization as described above.
Last updated