Skip to content
Dashboard

Installation

Detour provides a React Native SDK (@swmansion/react-native-detour) compatible with Expo and bare React Native projects.

Before installation, make sure your app is created in the Detour Dashboard and you have:

  • appID from API configuration
  • publishable apiKey from API configuration
  • platform integration snippets from App configuration
Terminal window
npm install @swmansion/react-native-detour
Terminal window
npm install expo-localization react-native-device-info expo-clipboard @react-native-async-storage/async-storage expo-application
import { type Config } from '@swmansion/react-native-detour';
export const detourConfig: Config = {
apiKey: process.env.EXPO_PUBLIC_DETOUR_API_KEY!,
appID: process.env.EXPO_PUBLIC_DETOUR_APP_ID!,
shouldUseClipboard: true,
};

Keep apiKey and appID in environment variables or another secure configuration layer.

  1. Implement the provider and link handling in Usage.
  2. Pick a runnable app pattern in Examples.
  3. If upgrading existing code, follow Migration to v1.