📱 React Native Intermediate

What is CodePush (App Center) and OTA updates?

Why Interviewers Ask This

This question targets practical, hands-on experience with React Native. Interviewers want to see if you've worked with these concepts in real projects, not just read about them. Strong answers include concrete examples.

Answer

Over-the-Air (OTA) updates allow pushing JavaScript and asset changes to users' devices without going through the App Store/Play Store review process. React Native's architecture enables this because the app's behavior is determined by the JavaScript bundle — native code stays the same, only JS updates. How OTA works: you upload a new JS bundle to a hosting service; on app startup, the app checks for updates; downloads the new bundle in the background; applies the update on next app restart. EAS Update (Expo's OTA service): the modern solution for Expo projects: // Publish update: npx eas-cli update --branch production --message "Fix crash" // In app code: import * as Updates from "expo-updates"; async function checkForUpdate() { const update = await Updates.checkForUpdateAsync(); if (update.isAvailable) { await Updates.fetchUpdateAsync(); await Updates.reloadAsync(); // Apply immediately } }. Microsoft App Center CodePush: the original OTA solution, works with both Expo and bare React Native: import codePush from "react-native-code-push"; const App = codePush({ checkFrequency: codePush.CheckFrequency.ON_APP_START, installMode: codePush.InstallMode.NEXT_RESTART })(RootComponent);. Limitations: OTA can only update JavaScript and assets (images, fonts). Cannot update native code — those still require App Store releases. Apple's guidelines: OTA updates must not fundamentally change app behavior or add new features (bug fixes and minor improvements are generally fine). Channels/Branches: different update channels for production, staging, beta testers.

Pro Tip

Before answering, structure your response: one-line definition → real-world analogy → concrete example from a project. This makes even complex React Native answers easy to follow.