1

I am working on a Password Management App. My team used the following SO reference on how to log-out a user after a set amount of time (selected in settings by the user) and bring the user directly back to the sign-in page: iOS perform action after period of inactivity (no user interaction)

We have come across a problem. When the user navigates away from the app, then the app auto-logs out, and then the user navigates back to the app, it will show the page the user was previously on for a split second. Testing this, I was able to capture a photo of that page in that split second. This creates a security loop-hole in that the app will show private information for a split second and can be captured in a photo!

Does anyone have any suggestions, links or sample code that will ensure the app will show the sign-in page immediately if you navigate back to app after being away from the app and the app has logged-out in the background?

Community
  • 1
  • 1
  • Where in the view life cycle did you implement this time out method? You would be better off implementing it in the AppDelegate – Naz Mir Sep 07 '13 at 16:41

1 Answers1

1

From the "iOS App Programming Guide":

What to Do When Moving to the Background

Apps can use their applicationDidEnterBackground: method to prepare for moving to the background state. When moving to the background, all apps should do the following:

Prepare to have their picture taken. When the applicationDidEnterBackground: method returns, the system takes a picture of your app’s user interface and uses the resulting image for transition animations. If any views in your interface contain sensitive information, you should hide or modify those views before the applicationDidEnterBackground: method returns.

One solution for sensitive apps is to throw up a blank screen in applicationDidEnterBackground:. When the user returns to the app, they see the blank screen for a second and not the sensitive data. Of course you need to remove the blank screen in applicationWillEnterForeground:.

Community
  • 1
  • 1
rmaddy
  • 314,917
  • 42
  • 532
  • 579