News for hackers. Stuff that matters.
Re:Locking in WebKit (2016) by untog on Monday December 17, 2018 @09:51AM (#18699249)
WkWebView is used a lot in apps to present content that isn't immediately obviously web content, rather it is just using HTML/CSS as a presentation layer. One example is the activity feed in Instagram - I only know this because once upon a time the page lost CSS on a reload and I got to see it in all its link-blue-bordered glory.

The Safari controller is for when you're linking out to an external web site and want the user to behave the way they would in a normal browsing session.

Re:Locking in WebKit (2016) by saagarjha on Monday December 17, 2018 @02:28PM (#18701400)
A notable reason to use UIWebView is that it allows for changing network requests (for example, to add special headers). WKWebView does not because it runs out-of-process. So some of the web views you're seeing might actually be UIWebViews, depending on the context you're seeing them in.
Re:Locking in WebKit (2016) by untog on Monday December 17, 2018 @04:31PM (#18702393)
WKWebView now does allow that, in a roundabout way, through WKURLSchemeHandler.
Re:Locking in WebKit (2016) by saagarjha on Monday December 17, 2018 @04:40PM (#18702474)
It seems like this can only be used to support URL schemes "that WebKit doesn't know how to handle"?
Re:Locking in WebKit (2016) by untog on Monday December 17, 2018 @11:40PM (#18704564)
Yes, you create your own. In my example of the Instagram activity feed you'd point the view at instagram://activity-view or something like that in order to intercept the request and send a custom response. You could use the same method to "proxy" through to HTTP.