Add react-native-exit-app-v2
This commit is contained in:
committed by
Sofiya Tepikin
parent
829b4bf242
commit
d8c4278fec
+8
-2
@@ -2,7 +2,10 @@ import Realm from 'realm'
|
|||||||
import { LocalDate, ChronoUnit } from 'js-joda'
|
import { LocalDate, ChronoUnit } from 'js-joda'
|
||||||
import nodejs from 'nodejs-mobile-react-native'
|
import nodejs from 'nodejs-mobile-react-native'
|
||||||
import fs from 'react-native-fs'
|
import fs from 'react-native-fs'
|
||||||
import restart from 'react-native-restart'
|
// Current version of react-native-restart doesn't work with our ios setup
|
||||||
|
// therefore react-native-exit-app-v2 is used to close the app after setting pwd
|
||||||
|
// import restart from 'react-native-restart'
|
||||||
|
import RNExitApp from 'react-native-exit-app-v2'
|
||||||
import schemas from './schemas'
|
import schemas from './schemas'
|
||||||
import cycleModule from '../lib/cycle'
|
import cycleModule from '../lib/cycle'
|
||||||
import maybeSetNewCycleStart from '../lib/set-new-cycle-start'
|
import maybeSetNewCycleStart from '../lib/set-new-cycle-start'
|
||||||
@@ -213,7 +216,10 @@ export async function changeEncryptionAndRestartApp(hash) {
|
|||||||
db.close()
|
db.close()
|
||||||
await fs.unlink(defaultPath)
|
await fs.unlink(defaultPath)
|
||||||
await fs.moveFile(copyPath, defaultPath)
|
await fs.moveFile(copyPath, defaultPath)
|
||||||
restart.Restart()
|
// Current version of react-native-restart doesn't work with our ios setup
|
||||||
|
// therefore react-native-exit-app-v2 is used to close the app after setting pwd
|
||||||
|
// restart.Restart()
|
||||||
|
RNExitApp.exitApp()
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isDbEmpty() {
|
export function isDbEmpty() {
|
||||||
|
|||||||
@@ -525,6 +525,7 @@
|
|||||||
"${BUILT_PRODUCTS_DIR}/RCTTypeSafety/RCTTypeSafety.framework",
|
"${BUILT_PRODUCTS_DIR}/RCTTypeSafety/RCTTypeSafety.framework",
|
||||||
"${BUILT_PRODUCTS_DIR}/RNCPushNotificationIOS/RNCPushNotificationIOS.framework",
|
"${BUILT_PRODUCTS_DIR}/RNCPushNotificationIOS/RNCPushNotificationIOS.framework",
|
||||||
"${BUILT_PRODUCTS_DIR}/RNDateTimePicker/RNDateTimePicker.framework",
|
"${BUILT_PRODUCTS_DIR}/RNDateTimePicker/RNDateTimePicker.framework",
|
||||||
|
"${BUILT_PRODUCTS_DIR}/RNExitApp/RNExitApp.framework",
|
||||||
"${BUILT_PRODUCTS_DIR}/RNFS/RNFS.framework",
|
"${BUILT_PRODUCTS_DIR}/RNFS/RNFS.framework",
|
||||||
"${BUILT_PRODUCTS_DIR}/RNShare/RNShare.framework",
|
"${BUILT_PRODUCTS_DIR}/RNShare/RNShare.framework",
|
||||||
"${BUILT_PRODUCTS_DIR}/RNVectorIcons/RNVectorIcons.framework",
|
"${BUILT_PRODUCTS_DIR}/RNVectorIcons/RNVectorIcons.framework",
|
||||||
@@ -563,6 +564,7 @@
|
|||||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTTypeSafety.framework",
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTTypeSafety.framework",
|
||||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNCPushNotificationIOS.framework",
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNCPushNotificationIOS.framework",
|
||||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNDateTimePicker.framework",
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNDateTimePicker.framework",
|
||||||
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNExitApp.framework",
|
||||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNFS.framework",
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNFS.framework",
|
||||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNShare.framework",
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNShare.framework",
|
||||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNVectorIcons.framework",
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNVectorIcons.framework",
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
"react-native": "0.61.0",
|
"react-native": "0.61.0",
|
||||||
"react-native-calendars": "^1.19.3",
|
"react-native-calendars": "^1.19.3",
|
||||||
"react-native-document-picker": "^4.2.0",
|
"react-native-document-picker": "^4.2.0",
|
||||||
|
"react-native-exit-app-v2": "^1.2.2",
|
||||||
"react-native-fs": "^2.19.0",
|
"react-native-fs": "^2.19.0",
|
||||||
"react-native-hyperlink": "0.0.19",
|
"react-native-hyperlink": "0.0.19",
|
||||||
"react-native-modal-datetime-picker": "8.0.0",
|
"react-native-modal-datetime-picker": "8.0.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user