Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebKit error domain and codes in iOS headers?

I want to trap a specific error from a UIWebView, specifically WebKitErrorFrameLoadInterruptedByPolicyChange (102) in webView:didFailLoadWithError:

The trouble is that since the WebKit framework proper isn't accessible in iOS I can't find those constants anywhere.

Is the only solution truly to hard code @"WebKitErrorDomain" and 102?

I hope not :)

like image 931
Mark Aufflick Avatar asked Feb 24 '11 03:02

Mark Aufflick


1 Answers

Men.. I have the same problem. It's lazy, but work

#define WebKitErrorFrameLoadInterruptedByPolicyChange 102

You can even use a enum if need more constant.

like image 99
Rodrigo Avatar answered Sep 29 '22 08:09

Rodrigo