I had a project where we display a UIWebView, where on failure to load, an alert will be displayed informing the user of the error.
This is a bit troublesome, since there are lots of UIWebView errors, and we cannot handle all of them immediately. Silently ignoring the errors would have been better (this just retains what’s loaded on the UIWebView, mostly blank, unless some part of the page has already been loaded).

But, if you need to display an alert like me, here are some you should look out for. By looking out for, I mean that you should handle it such that when the following errors are received, the alert will not be displayed (because they are errors that the user should not be concerned or informed about!).
Before that, you handle the errors in the following delegate method:

1. If the URL redirects to another URL, we will receive an NSURLErrorCancelled error.

2. If the page contains links to the AppStore, tapping the link will return an error (but the AppStore link will still be handled by iOS).

3. If the URL is a direct link to a Video/Audio, we will receive an error (“Plug-in handled load”) even if the video/audio will play.

That’s all for now. Will update this post as soon as new errors that need’s to be handled

Happy Goals for iOS

Happy Goals for iOS

Want an app to help you track and achieve your goals, without the complex stuff, saving you from headaches? Checkout Happy Goals - Habits & Goals Tracker now in the App Store! Happy Goals has been featured in the App Store in over 32 countries. Start now, better late than never!


Thank you!

%d bloggers like this: