diff --git a/MVMCore/MVMCore/Session/MVMCoreSessionTimeHandler.m b/MVMCore/MVMCore/Session/MVMCoreSessionTimeHandler.m index 0ab40c8..84dbc0f 100644 --- a/MVMCore/MVMCore/Session/MVMCoreSessionTimeHandler.m +++ b/MVMCore/MVMCore/Session/MVMCoreSessionTimeHandler.m @@ -124,11 +124,7 @@ if (!fequal(0, self.secondsUntilTimeout)) { self.sessionBeingTimed = YES; [self markStartTime]; - - // Only start physical timer if active, otherwise will begin once entering foreground. FaceId prompt is considered UIApplicationStateInactive. - if ([UIApplication sharedApplication].applicationState != UIApplicationStateBackground) { - [self resumeSessionTimer]; - } + [self resumeSessionTimer]; } } }); @@ -137,6 +133,11 @@ /// Resume the session timers if they are stopped. - (void)resumeSessionTimer { dispatch_async(dispatch_get_main_queue(), ^(void) { + // Only start physical timer if active, otherwise will begin once entering foreground. FaceId prompt is considered UIApplicationStateInactive. + if ([UIApplication sharedApplication].applicationState == UIApplicationStateBackground) { + return; + } + if (!fequal(0, self.secondsUntilWarning) && ![self.sessionWarningTimer isValid]) { self.sessionWarningTimer = [NSTimer scheduledTimerWithTimeInterval:[self remainingTimeUntilWarning] target:self selector:@selector(sessionTimeoutWarning) userInfo:nil repeats:NO]; MVMCoreLog(@"Session warning will fire at: %@", self.sessionWarningTimer.fireDate);