IOS: hide confidential information on the screen when you connect the application

When the background setting of the background menu (for example, the "Home" button), how to change the elements on the top view controller before iOS takes a picture and starts the animation to display the next screen?

I ask because I am writing an application that requires HIPAA compliance, and I am concerned that the snapshot that the OS takes to perform this animation sometimes contains sensitive data that should not be displayed even for a second of a second when the application exits later.

I know that view controllers have lifecycle methods such as viewWillDisappear that can be useful, but I have a lot of controllers, and I would prefer just something in my app deler for this (for example, adding an opaque full-screen UIImageView overlay), instead of writing your own code for this in each last controller.

I tried putting the code creating the overlay in applicationWillResignActive , and I was digging Apple and Google docs, but it doesn't work. I suspect that a screenshot will be taken before the application can update the screen.

Thanks!

+6
source share
2 answers

I believe that the answer is not to worry about changing what is displayed on the screen before starting the background music animation, but simply changing what is displayed on the screen when the application enters the background mode (i.e. inside applicationDidEnterBackground: in your application.) This solved my problem.

My idea of UIImageView worked here, although I decided to just jump onto the root view controller. To simplify this. There is no sensitive information in my root view.

Here's what it looks like:

 -(void)applicationDidEnterBackground:(UIApplication *)application { UINavigationController *navigationController = (UINavigationController *)self.window.rootViewController; [navigationController popToRootViewControllerAnimated:NO]; ... } 
+1
source

Not sure about HIPAA's requirements for origin, and possibly leaving the user logged in for someone else to resume, but it seems safest to add a UIApplicationExitsOnSuspend key with a boolean value from YES to info.plist ,

This will prevent the application from completely sounding and restart (possibly initiating a login procedure) every time you return to it.

Most (if not all) of the mobile banking applications I tested do this for security reasons.

+4
source

Source: https://habr.com/ru/post/926233/


All Articles