{"id":19932,"date":"2017-12-22T15:50:52","date_gmt":"2017-12-22T20:50:52","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=19932"},"modified":"2020-02-24T15:44:44","modified_gmt":"2020-02-24T20:44:44","slug":"wkwebview-workarounds","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2017\/12\/22\/wkwebview-workarounds\/","title":{"rendered":"WKWebView Workarounds"},"content":{"rendered":"<p><a href=\"http:\/\/inessential.com\/2017\/12\/20\/wkwebview_workarounds\">Brent Simmons<\/a>:<\/p>\n<blockquote cite=\"http:\/\/inessential.com\/2017\/12\/20\/wkwebview_workarounds\">\n<p><code>WebView<\/code> &mdash; good &rsquo;ol trusty friend &mdash; has a bunch of things that <code>WKWebView<\/code> is missing.<\/p>\n<p>The new web view has no built-in support for finding text, for instance. I&rsquo;m not sure what I&rsquo;m going to do about this, since the ability to hit cmd-F and look for some text is a pretty fundamental thing, and I can&rsquo;t skip it.<\/p>\n<p>It also has no delegate method for when you mouse over a link. Seems like another fundamental thing, right? Any browser offers you a status bar or some way to see the URL of the link your mouse is over.<\/p>\n<\/blockquote>\n\n<p>Given the level of progress over the last 3.5 or so years, it seems like <code>WKWebView<\/code> is the future, and too bad for you if you need more features. Maybe you can hack some of them together using JavaScript. With Apple no longer dogfooding <code>WebView<\/code>, how much longer will it be supported? This is the sort of thing that worries me about <a href=\"https:\/\/mjtsai.com\/blog\/2017\/12\/20\/apple-rumored-to-combine-iphone-ipad-and-mac-apps-to-create-one-user-experience\/\">iOS APIs coming to the Mac<\/a>.<\/p>\n\n<p>Update (2018-05-14): <a href=\"https:\/\/eclecticlight.co\/2018\/05\/12\/putting-a-browser-window-in-your-app\/\">Howard Oakley<\/a>:<\/p>\n<blockquote cite=\"https:\/\/eclecticlight.co\/2018\/05\/12\/putting-a-browser-window-in-your-app\/\">\n<p>That may be true, but when I had implemented that in LockRattler, which runs on El Capitan and later, Xcode decided that I couldn&rsquo;t use WKWebView because of implementation bugs. It only works in Sierra and later, not in El Capitan.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Brent Simmons: WebView &mdash; good &rsquo;ol trusty friend &mdash; has a bunch of things that WKWebView is missing. The new web view has no built-in support for finding text, for instance. I&rsquo;m not sure what I&rsquo;m going to do about this, since the ability to hit cmd-F and look for some text is a pretty [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2018-05-14T20:16:06Z","apple_news_api_id":"8bb88f53-fc68-4d55-8deb-3e64fc0490a3","apple_news_api_modified_at":"2020-02-24T20:44:48Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/Ai7iPU_xoTVWN6z5k_ASQow","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[],"tags":[30,1529,71,328,1926],"class_list":["post-19932","post","type-post","status-publish","format-standard","hentry","tag-mac","tag-macos-10-13","tag-programming","tag-webkit","tag-wkwebview"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/19932","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=19932"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/19932\/revisions"}],"predecessor-version":[{"id":21520,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/19932\/revisions\/21520"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=19932"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=19932"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=19932"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}