From 7a6643cc1a7af760a846a41e02133fd5553dff98 Mon Sep 17 00:00:00 2001 From: Sofiya Tepikin Date: Thu, 23 Jun 2022 21:46:41 +0200 Subject: [PATCH] Add alert before closing --- db/restart-app/index.ios.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/db/restart-app/index.ios.js b/db/restart-app/index.ios.js index 2d15425..0f3db9b 100644 --- a/db/restart-app/index.ios.js +++ b/db/restart-app/index.ios.js @@ -1,5 +1,11 @@ // Current version of react-native-restart doesn't work with our ios setup // therefore we have a fork and use different libraries on the platforms import RNExitApp from 'react-native-exit-app-v2' +import { Alert } from 'react-native' -export const restartApp = RNExitApp.exitApp +export const restartApp = () => { + Alert.alert('Closing app', 'App is shutting down. Please restart.') + setTimeout(() => { + RNExitApp.exitApp() + }, 3000) +}