Add API for saving and restoring a WKWebView's _WKSessionState
Would this state also include the WKBackForwardList ?
<rdar://problem/21349869>
(In reply to comment #1) > Would this state also include the WKBackForwardList ? Yes, it would.
It would (In reply to Brady Eidson from comment #3) > (In reply to comment #1) > > Would this state also include the WKBackForwardList ? > > Yes, it would. Please do fix this. Or at least make the backForwardList readwrite. It is now impossible to restore the state of the WKWebView when the app starts. There's many proposed hacks, but none works really well.
I hope this is the right issue to revive discussion around session state restoration for WKWebView. I recently asked Brady Eidson about exposing the existing private _WKSessionState API on Twitter, and he mentioned more work would be needed to design a better API for this (https://twitter.com/bradeeoh/status/1278359540551933952?s=20): > Hi! We know developers have uses for this type of API, and as such it's on our roadmap. > It's not nearly as simple as exposing that SPI, which is *not* something we're proud of and would dread supporting in perpetuity. Not sure what the right process for this is, but I'd love to find a way to help make progress on this issue. Since this seems to be a long standing issue and I'm new to the project, I'm sure there's a lot of context I'm missing. What problems with the existing API have kept it from being made public? What direction are people thinking in for redesigning it?