Getting Started
Get up and running with Expo Fancy OTA Updates in minutes.
Prerequisites
- Expo SDK 50+ (with
expo-updatesconfigured) - React Native app with Expo Router
- EAS CLI installed (
npm install -g eas-cli)
Installation
bash
bun add @ddedic/expo-fancy-ota-updatesbash
npm install @ddedic/expo-fancy-ota-updatesbash
yarn add @ddedic/expo-fancy-ota-updatesPeer Dependencies
The following dependencies are required:
bash
bun add expo expo-updates expo-device react react-native react-native-reanimated react-native-safe-area-contextOptional Dependencies
For enhanced visuals:
bash
# For gradient banners
bun add expo-linear-gradient
# For beautiful icons (recommended)
bun add lucide-react-native react-native-svgQuick Setup
1. Create Version File
Create ota-version.json in your project root:
json
{
"version": "1.0.0",
"buildNumber": 1,
"releaseDate": "2025-01-01T00:00:00.000Z",
"changelog": ["Initial release"]
}2. Add Provider
Wrap your app with OTAUpdatesProvider:
tsx
// App.tsx or _layout.tsx
import { OTAUpdatesProvider, UpdateBanner } from '@ddedic/expo-fancy-ota-updates';
import versionData from './ota-version.json';
export default function App() {
return (
<OTAUpdatesProvider config={{ versionData }}>
{/* Banner auto-shows when update is available */}
<UpdateBanner />
{/* Your app content */}
<YourApp />
</OTAUpdatesProvider>
);
}3. Initialize CLI
bash
npx ota-publish initThis creates ota-updates.config.js for CLI configuration.
4. Publish Your First Update
bash
npx ota-publish --channel developmentThat's it! 🎉 The banner will automatically appear when an OTA update is detected.