WKWebView/UIWebView 获取网站图标

WKWebView/UIWebView get website icon

如何使用WKWebView或UIWebView获取网站的apple-touch-icon或logo?我读到过获得网站图标是可能的,但是我计划像 iOS Safari 一样使用网站的徽标作为快捷方式,并且网站图标对于它来说太小了。有没有办法从 webView 中的网站抓取元数据以获得 <link rel="apple-touch-icon" href="apple-touch-icon.png">?

在 iOS 的 Firefox 中,我们使用 User Script (Link to code on Github) to find the icon that then passes them back to the application which downloads them using native code(Link 在 Github 上编码)。