An iOS developer receives a crash report showing that their app crashed in the AppDelegate applicationDidEnterBackground: method while displaying a modal with sensitive account information. On the crash device, screenshots in the iOS app switcher show the account numbers.
What should the developer do in applicationDidEnterBackground: (or sceneDidEnterBackground:) to prevent sensitive information exposure in the app switcher?
- A.Place an opaque overlay view or blur the window in sceneDidEnterBackground:, and remove it in sceneWillEnterForeground: - or use UIImageView with a placeholder image over the window; this prevents the OS snapshot (used for the app switcher thumbnail) from capturing sensitive content
- B.Call ignoreSnapshotOnNextApplicationLaunch() on the shared UIApplication, and iOS skips the app switcher snapshot for the rest of the session (the call is documented in the UIApplication reference); the modal stays out of the thumbnail
- C.