问题
How can I get the apple-touch-icon or logo of the website using WKWebView or UIWebView? I've read that getting a favicon is possible, however I plan on using the website's logo as a short cut like in iOS Safari and a favicon is too small for it. Is there a way to scrape metadata from a website in webView to get <link rel="apple-touch-icon" href="apple-touch-icon.png">
?
回答1:
In Firefox for iOS we use a 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 to code on Github).
来源:https://stackoverflow.com/questions/29940693/wkwebview-uiwebview-get-website-icon