From a9b8f4a3c5ba7858eac68a858b4185cdae5e7ed5 Mon Sep 17 00:00:00 2001 From: MobileMage Date: Wed, 28 Jan 2026 14:40:15 +0100 Subject: [PATCH 1/3] fix: save last route before opening settings in Onfido permission flow On iOS, when the user navigates to Settings to grant camera permissions, the app may restart when permissions are changed. This causes the user to lose their place in the verification flow. By calling saveLastRoute() before opening settings, we preserve the navigation state so the user returns to the verification screen after granting permissions. --- src/components/Onfido/index.native.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/Onfido/index.native.tsx b/src/components/Onfido/index.native.tsx index 917a5186317bc..c700667ed395a 100644 --- a/src/components/Onfido/index.native.tsx +++ b/src/components/Onfido/index.native.tsx @@ -6,6 +6,7 @@ import FullscreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; import useLocalize from '@hooks/useLocalize'; import getPlatform from '@libs/getPlatform'; import Log from '@libs/Log'; +import saveLastRoute from '@libs/saveLastRoute'; import CONST from '@src/CONST'; import type {TranslationPaths} from '@src/languages/types'; import type {OnfidoError, OnfidoProps} from './types'; @@ -80,6 +81,10 @@ function Onfido({sdkToken, onUserExit, onSuccess, onError}: OnfidoProps) { { text: translate('common.settings'), onPress: () => { + // Save the current route so the user can return to the verification flow + // after granting permissions in settings. On iOS, the app restarts when + // certain permissions are changed, so we need to preserve the navigation state. + saveLastRoute(); onUserExit(); Linking.openSettings(); }, From 071c7a81d6a732065844c066be78304cb3bc5057 Mon Sep 17 00:00:00 2001 From: MobileMage Date: Sat, 31 Jan 2026 02:20:32 +0100 Subject: [PATCH 2/3] Use goToSettings helper instead of manual saveLastRoute + Linking.openSettings --- src/components/Onfido/index.native.tsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/components/Onfido/index.native.tsx b/src/components/Onfido/index.native.tsx index c700667ed395a..d29285dc8bc1e 100644 --- a/src/components/Onfido/index.native.tsx +++ b/src/components/Onfido/index.native.tsx @@ -1,12 +1,12 @@ import {OnfidoCaptureType, OnfidoCountryCode, OnfidoDocumentType, OnfidoNFCOptions, Onfido as OnfidoSDK, OnfidoTheme} from '@onfido/react-native-sdk'; import React, {useEffect} from 'react'; -import {Alert, Linking, NativeModules} from 'react-native'; +import {Alert, NativeModules} from 'react-native'; import {checkMultiple, PERMISSIONS, RESULTS} from 'react-native-permissions'; import FullscreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; import useLocalize from '@hooks/useLocalize'; import getPlatform from '@libs/getPlatform'; +import goToSettings from '@libs/goToSettings'; import Log from '@libs/Log'; -import saveLastRoute from '@libs/saveLastRoute'; import CONST from '@src/CONST'; import type {TranslationPaths} from '@src/languages/types'; import type {OnfidoError, OnfidoProps} from './types'; @@ -81,12 +81,8 @@ function Onfido({sdkToken, onUserExit, onSuccess, onError}: OnfidoProps) { { text: translate('common.settings'), onPress: () => { - // Save the current route so the user can return to the verification flow - // after granting permissions in settings. On iOS, the app restarts when - // certain permissions are changed, so we need to preserve the navigation state. - saveLastRoute(); onUserExit(); - Linking.openSettings(); + goToSettings(); }, }, ], From 80b062e41a7cd864f6201e059f842ba8c3b3d046 Mon Sep 17 00:00:00 2001 From: MobileMage Date: Sat, 31 Jan 2026 08:35:03 +0100 Subject: [PATCH 3/3] Retrigger CI checks