How can I jump to the App Store from a UIWebView link in my iPhone app?

app-store, iphone, uiwebview, xcode

Solution

Hmm. Perhaps you’re right. In that case, simply use this function of the `UIWebViewDelegate`:

- (BOOL)webView:(UIWebView *)webView
shouldStartLoadWithRequest:(NSURLRequest *)request
 navigationType:(UIWebViewNavigationType)navigationType

Parse the `NSURLRequest` to see if it’s an iTunes link and if it is, do this:

[[UIApplication sharedApplication] openURL:someURL];

Problem

I want to take a user OUT of my app and into the App Store when they click on a link within a UIWebView in my app. But when I click on the link, nothing happens (sim AND device both). How can I jump to the App Store from a UIWebView link in my iPhone app? BY THE WAY: The link in my UIWebView html is as currently follows (minus the self-promotion) ``` <a href="http://itunes.apple.com/jp/app/someappname/someidnum?mt=8">Download Now</a> ```

Original source