I’m using react-native-code-push to handle updates in my React Native application. I’ve configured updateDialog: true in CodePush.sync() to display a dialog when an update is available, with immediate installation (installMode: CodePush.InstallMode.IMMEDIATE). However, when an update is detected, only the update message is shown without the expected header and buttons (Install and Ignore).
import { StyleSheet, View } from 'react-native';
import CodePush from 'react-native-code-push';
import Profile from './components/Profile';
const codePushOptions = {
checkFrequency: CodePush.CheckFrequency.MANUAL,
};
const App = () => {
useEffect(() => {
CodePush.sync({
updateDialog: true,
installMode: CodePush.InstallMode.IMMEDIATE,
});
}, []);
return (
<View style={styles.container}>
<Profile />
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
});
export default CodePush(codePushOptions)(App);
In this setup:
I expect a dialog with a title, update message, and buttons (Install and Ignore) to appear when an update is available.
However, only the update message is displayed without any buttons or a header.
Could someone please advise on how to ensure that the complete update dialog (with title, message, and buttons) appears correctly? Am I missing any additional configuration or handling for updateDialog?