Exit / Restart your react native app. Does not invoke a crash notification.
React Native >= 0.60 supports autolinking, so you can simply run:
npm install react-native-app-controlManual linking (for React Native < 0.60)
If you are using React Native version < 0.60, you will need to link the library manually. Follow these steps:
npm install react-native-app-control
react-native link react-native-app-controlimport AppControl from 'react-native-app-control';
AppControl.Exit();
AppControl.Restart();On iOS, AppControl.Restart() displays a localized popup before closing the app.
The popup language is automatically detected from the device's system language.
On Android, AppControl.Restart() performs a complete app restart without showing a popup.
- Old architecture: ✅
- New architecture: ✅
- Android: ✅ (Tested on Android >= 12)
- iOS: ✅ (Tested on iOS >= 18)
- Web: ❌ (Not supported)
This library is based on the react-native-exit-app library by wumke.