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 URLs 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?
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 ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With