Using WKPageLoadURLRequestReturningNavigation() for now will call underlying WebKit:: WebPageProxy::loadRequest() with shouldOpenExternalURLsPolicy set to ShouldAllowExternalSchemes. It won't allow opening universal links with the proper application. Instead, WKPageLoadURLRequestReturningNavigation() should be using shouldOpenExternalURLsPolicy set to ShouldAllow.
Created attachment 408989 [details] Patch
Comment on attachment 408989 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=408989&action=review > Source/WebCore/loader/FrameLoaderTypes.h:141 > + // Don't allow external URLs. > ShouldNotAllow, > + // External schemes are allowed but App Links are not. > ShouldAllowExternalSchemes, > + // Allow external URLs. > ShouldAllow, Please revise the names instead of adding comments. We want these names clear everywhere they are used, not just when reading this header. ShouldAllowExternalSchemesButNotAppLinks
Created attachment 408994 [details] Patch
Comment on attachment 408994 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=408994&action=review > Source/WebKit/ChangeLog:24 > + * UIProcess/API/C/mac/WKPagePrivateMac.mm: > + (WKPageLoadURLRequestReturningNavigation): Allow universal links. What’s the rationale for this? I’m not sure there’s anything in the name that makes it clear it should allow universal links. I presume this is the behavior Safari wants, but is that clear enough in the SPI contract for this function? Are there non-Safari clients who might want different behavior?
Comment on attachment 408994 [details] Patch Safari should use WKWebView._loadRequest:shouldOpenExternalURLs: instead of this.
It's a deprecated API. It won't be fixed.