Last active
April 18, 2021 10:03
-
-
Save alekseypotapov-dev/1db8244284c15d19a741 to your computer and use it in GitHub Desktop.
Blurring sensitive data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma mark - Security | |
- (void)applicationDidEnterBackground:(UIApplication *)application { | |
RootViewController *rootVC = (RootViewController *)self.window.rootViewController; | |
UIViewController *viewController = (UIViewController *)[rootVC.presentedViewControllers lastObject]; | |
/** | |
If the last presented view controller is a SplashViewController we must not present the splash | |
screen again. | |
*/ | |
if (![viewController isKindOfClass:[SplashViewController class]]) { | |
/** | |
We're presenting a splash screen when the app backgrounds as a privacy and security feature. | |
This view needs to block the UI so that a screenshot of sensitive data does not accidentally | |
get saved to the background. | |
*/ | |
[self presentSplashViewController]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment