Search code examples
iosuiwebviewwkwebview

Is WKWebView designed as a replacement of UIWebView?


Asking this questions as I am not sure why Apple introduced WKWebView without deprecating UIWebView. It is important to have an idea as I am programming a large code base and need to make an informed / fact based decision.

  • Are there any reason for which we may have to expect both classes to co-exist in the future and none get deprecated?

  • Is WKWebView purely designed for speed performance (using JIT) and will likely to serve only for certain use cases?

Current limitations of WKWebView:

https://mail.mozilla.org/pipermail/mobile-firefox-dev/2014-December/000993.html

How can I retrieve a file using WKWebView?


Solution

  • Update: UIWebView is now deprecated and Apple is actively discouraging developers from using it.


    There are several reasons, including security (out of process model), performance and memory management. Whether Apple would deprecate UIWebView is not something anyone can answer but Apple, however considering the many limitations there currently are (some partially solved in WebKit2 source repository for future iOS WK2 framework inclusion), my educated guess would be that UIWebView is here to stay for different needs. And considering both WebKitLegacy and WebKit2 (now renamed WebKit) frameworks reference the same implementation frameworks (WebCore, JSCore, etc.), it would not require a lot of work to keep UIWebView alive.