Expo Updates — OTA updates for Expo apps.
Setup:
1expo install expo-updates
Configuration (app.json):
1{2 "expo": {3 "updates": {4 "url": "https://u.expo.dev/YOUR_PROJECT_ID"5 }6 }7}
Check for updates:
1import * as Updates from 'expo-updates';23async function checkUpdates() {4 try {5 const update = await Updates.checkForUpdateAsync();6 if (update.isAvailable) {7 await Updates.fetchUpdateAsync();8 await Updates.reloadAsync();9 }10 } catch (e) {11 console.error("Update error:", e);12 }13}
Auto-update on foreground:
1Updates.addListener((event) => {2 if (event.type === Updates.UpdateEventType.UPDATE_AVAILABLE) {3 Updates.fetchUpdateAsync().then(() => {4 Updates.reloadAsync();5 });6 }7});
Limitations: