Bug 152837

Summary: App store redirects do not work in WKWebView.
Product: WebKit Reporter: gchatz
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: sam
Priority: P2 Keywords: InRadar
Version: Safari 9   
Hardware: iPhone / iPad   
OS: iOS 9.0   
Attachments:
Description Flags
Screenshot of page shown when visiting app store link. none

gchatz
Reported 2016-01-07 10:19:45 PST
Created attachment 268465 [details] Screenshot of page shown when visiting app store link. When a user taps a link to go the app store to see an app (such as https://itunes.apple.com/us/app/snapchat/id447188370), WKWebView does not receive the redirect to an itms scheme URL, and the user navigates to an incorrect website which describes App Store features, instead of redirecting to the app store app. This happens most of the time. Steps to Reproduce: Go to an iTunes app store link from WKWebView. Expected Results: Redirect to iOS app store app to see relevant app listing. Actual Results: The user navigates to an incorrect website which describes iTunes app store features. (Screenshot attached) Version: iOS 9.x
Attachments
Screenshot of page shown when visiting app store link. (175.13 KB, image/png)
2016-01-07 10:19 PST, gchatz
no flags
gchatz
Comment 1 2016-01-07 10:20:53 PST
Sam Weinig
Comment 2 2016-01-08 12:08:08 PST
This is correct behavior. If you want the redirect, you need to implement the navigation delegate's policy handling functions to do this. Specifically: - (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler;
Note You need to log in before you can comment on or make changes to this bug.