wkwebview links not working ?

Using WKWebView is working ok but has one problem. Links I want to open from a google search won't, I'm sure they did but now they don't, but everywhere else I've tried work ok. Is there some reason for this ?

Replies

Links I want to open from a google search won't …

Please give me details about the problem you’re seeing. Where are these links you’re trying to open? Inside the web view? And where are you expected them to open? Also inside the web view?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Have you examined the URLs of the links? Google's started doing something strange with their links, nominally to improve speed. They cache everything and push it into their "Amp" framework, which means half the time when you're looking at something, you're not going to the original page, but viewing a Google-wrapped cache view. It may be that something about that is breaking the WKWebView logic you've built.

"Links I want to open from a google search won't"


From a Google search. So, once I have the search results clicking on a link does nothing.

Bennomatic ...


I started a new project and works fine, must have gotten corrupted somewhere. Keeping an eye out if it does the same again.


Using WKWebView whilst broken has no visible response at all but WebView does have some response but also won't do anything.

Just added the WKNavigationDelegate, used the "didStartProvisionalNavigation" and have lost the ability to load some Webloc files. If it's a standard address like "http://youtube.co.uk" then works fine, but any links of a google search won't e.g. "http://www.google.co.uk/url?q=https://cocoacasts.com...".

I forgot to mention this is with drag & drop the webloc files into the webview.

Whilst looking into cookies I found something very odd. To get a cookie for "stay signed in" I used Youtube as a test and after signing in tried a google search and came to the same problem, google search links don't do anything. However after signing out from youtube it works again.


Is there somewhere I can put this for attention / bug report ?