Quickstart
Get from zero to shipping OTA updates in under 5 minutes.
Prerequisites
- An Expo or React Native project
- An AppDispatch account and API key (Settings → API Keys in the dashboard)
1. Install the CLI
See the CLI reference for platform-specific binaries, or on macOS:
curl -sL https://github.com/AppDispatch/cli/releases/latest/download/dispatch-darwin-arm64 \
-o /usr/local/bin/dispatch && chmod +x /usr/local/bin/dispatch2. Log in
dispatch login --server https://api.appdispatch.com --key YOUR_API_KEY3. Initialize your project
From your Expo project root:
dispatch initSelect your project, and the CLI will configure app.json automatically.
4. Install the SDK
npm install @appdispatch/react-native5. Set up your app
Add the SDK to your root layout. AppDispatch.init() configures everything — OTA updates, feature flags, and health reporting — in one call:
app/_layout.tsx
import {
AppDispatch,
AppDispatchProvider,
useOTAUpdates,
} from '@appdispatch/react-native'
AppDispatch.init({
baseUrl: 'https://api.appdispatch.com',
projectSlug: 'my-app',
apiKey: 'YOUR_API_KEY',
channel: 'production',
})
export default function RootLayout() {
useOTAUpdates()
return (
<AppDispatchProvider>
<YourApp />
</AppDispatchProvider>
)
}AppDispatch.init()— Initializes the OpenFeature provider and health reporter at module leveluseOTAUpdates()— Checks for updates on launch, generates a stable device ID for rollout bucketing, and applies critical updates immediately. No-ops in__DEV__mode.AppDispatchProvider— Wraps your app with the OpenFeature context and starts health monitoring
6. Publish your first release
dispatch publish -m "Initial release"7. Verify
Open your app on a device or simulator. On the next launch, expo-updates will fetch the new bundle from AppDispatch and apply it.
What just happened?
dispatch publishexported your app and uploaded the bundle- Your device’s
useOTAUpdateshook checked for a new manifest - Changed assets were downloaded and applied
- On next launch, the new code runs
Next steps
Last updated on