views:

1108

answers:

1

Hey guys,

I have a UIWebView in my app that is used to show webpages of links clicked within my app.

Some of the links are URL-Shortened links, such as tinyURL or bit.ly. These url's redirect after the initial url load.

My problem is that some of the links in my app are URL-Shortened links to resources that are not webpages - such as videos or other media.

I can use the webView:shouldStartLoadWithRequest:navigationType: to intercept the URL and decide what to do with it - only it is only called on the initial load, and not after the redirect.

What can I do to intercept the URL that the bit.ly link is pointing at?

Any help would be greatly appreciated.

+1  A: 

It seems my overzealous mind didn't take the time to actually inspect the flow of the URL loading with UIWebView. The webView:shouldStartLoadWithRequest:navigationType: does capture redirects. Sorry for wasting anyone's time ;)

Jasarien