Currently Safari and Chrome will automatically restore tabs when an application is manually suspended (i.e, swipe the application off the running list). Currently we do not restore any tabs.
This WFM -- any other details?
Confirm you're testing on device? I open a tab, e.g, http://blogto.com, double-tap home button, swipe the browser off, re-launch the browser, the only tab open is about:home
Yeah, device (and simulator) restore works fine for me.
Tried it on my iPad Air (8.3) which made no difference. My tabs are never restored on browser re-launch, just a single about:home tab. I'm using the Client scheme on latest code.
From TestFlight Firefox for iOS 1.0 (13) What to test: "The app now remembers the tabs you had open" - it doesn't (on IPhone 5S)
Tested on an iPhone 4s as well and non of my tabs are restored at all ever.
Can reliably reproduce this on the simulator.
Still doesn't work, latest code
Previous patch is responding to UIStateRestoring lifecycle events. However, UIStateRestoration (how this is implemented) doesn't support Force Quitting. Worse: when the app is Force Quit, the state restoration archive gets deleted.
I swear this was working for me at one point, even when force quitting. I wonder what changed?
Is there any update here?
I set a breakpoint on our tab preservation/restoration code and I can confirm that the state code is called when you double-tap the home button and then close the application. In other words: swiping the app away from that screen does not 'force kill' the app. It simply asks the app to stop and as part of that the state preservation handlers are invoked. (AFAIK there is no Force Kill on iOS) To me that means that this bug can be closed as WONTFIX. No code changed are required.
I do not agree at all as WONTFIX. Both Safari and Chrome restore tabs.
Maybe Stefan meant WORKSFORME? It's definitely a bug that needs to be addressed, but sounds like it might be working as expected now according to comment 12.
My findings are premature. I don't know why encodeRestorableStateWithCoder is being called when the app is killed manually. I don't think it should be because the UIKit Guide says this: "The system automatically DELETES AN APP'S PRESERVED STATE when the user FORCE QUITS the app. Deleting the preserved state information when the app is killed is a safety precaution. (As a safety precaution, the system also deletes preserved state if the app crashes twice during launch.) If you want to test your app’s ability to restore its state, you should not use the multitasking bar to kill the app during debugging. Instead, use Xcode to kill the app or kill the app programmatically by installing a temporary command or gesture to call exit on demand." So, we can either close this as 'works as intended' or we can keep this open to do whatever Safari did to work around the system default. I like the system default btw. Because it is an escape hatch. And we don't have anything better at this point. So my suggestion is to leave this as it is now until we have implemented bug 1166372 - We need to recognize when we crashed and then allow the user to not reopen tabs.
That's not what this bug is about. I don't think we can ship if my tabs are never restored. Bug https://bugzilla.mozilla.org/show_bug.cgi?id=1127061 is a meta bug that is tracking version 1.0
Created attachment 8627295 [details] [review] PR: https://github.com/mozilla/firefox-ios/pull/651 This patch reverts the `UIStateRestoring` code. Instead we now do the same storing/restoring of tabs but on our own terms. This means that we are on parity with Chrome and Safari so that tabs are also restored when we crash or when the user kills the app from the app switcher. Special request for QA to test this carefully.
Comment on attachment 8627295 [details] [review] PR: https://github.com/mozilla/firefox-ios/pull/651 Patch looks good! I wonder if we need to know when the application crashed previously if it would be worth the effort to add Breakpad/PLCrashReporter.framework so we get in-process crash reporting. This would also help with the issue we're seeing with test flight reports not coming in.