I have a code that opens a link inside a webview in Safari, which looks like this.
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType{
if (navigationType == UIWebViewNavigationTypeLinkClicked){
NSLog(@"%@", request);
NSURL *url = request.URL;
[[UIApplication sharedApplication] openURL:url];
}
return YES;
}
However, when I click the link, it shows the error
LaunchServices: ERROR: There is no registered handler for URL scheme applewebdata
The environment is iOS 9. Is there some setting in the plist I need to change?