Closed Bug 1168452 Opened 4 years ago Closed 4 years ago
App shows stale snapshots on startup
Every time i start the app, it shows me a stale screenshot of some CNN page that I looked at some time ago. Even though I do not have that tab open anymore. This probably has something to do with the state preservation/restoration. I see there is a UIApplication.ignoreSnapshotOnNextApplicationLaunch() Also, at https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html#//apple_ref/doc/uid/TP40007072-CH4-SW8 it says: "Remove sensitive information from views before moving to the background. When an app transitions to the background, the system takes a snapshot of the app’s main window, which it then presents briefly when transitioning your app back to the foreground. Before returning from your applicationDidEnterBackground: method, you should hide or obscure passwords and other sensitive personal information that might be captured as part of the snapshot." Not totally sure what to do here.
Maybe we'll try using bug 1149678's solution for this instead.
Assignee: nobody → sleroux
tracking-fennec: ? → +
Depends on: 1149678
I haven't seen this happen as of late. I have a feeling that the UIStateRestoration work Stefan did sorted this out -> https://github.com/mozilla/firefox-ios/pull/491
I'm only seeing this on the iPad Air simulator and what seems to be happening is the system is failing to take a screenshot of the latest screen so it resorts to the one it previously had. The console is spewing out the following: Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates. I believe this is also causing problems with https://bugzilla.mozilla.org/show_bug.cgi?id=1151490 since if it doesn't have a snapshot prepared it most likely defaults to the launch image.
Seems thats the following console error: Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates. Is being caused by us using the UIView snapshot API and not the system taking the background snapshot it doesn't seem that this relates to the issue we're seeing.
Closing as WFM until it becomes a problem and reproducible.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.