I have a programatically crated UIWebView
, and it is used to browse a iPhone-style site stored on my server. In this website, there are a few links to files use
So here's the problem: UIWebView
doesn't download anything it can't display, and it doesn't know how to display a ZIP file. It will always fail before the Content-Type is filled in.
So, what to do? I don't know if your server-side app runs on more than the iPhone, but you could register a custom URL scheme with links like myapplication://example.com/stuff/yourhexurlgoeshere
. You can create a custom URL handler for the myapplication
scheme. A couple of seconds of Googling produced this site, which explains how to do it.
This has an additional benefit because if you, say, emailed such a link to another user, they could tap on it in Mail and have it open in your application.