Last Revision:
Version 1.0, 2013-08-22
An NSURLProtocol subclass that intercepts the connections made by a web view.
Build Requirements:
Xcode 4.6.3, iOS 6.1 SDK
Runtime Requirements:
iOS 5.1 or later

CustomHTTPProtocol shows how to use an NSURLProtocol subclass to intercept the NSURLConnections made by a high-level subsystem that does not otherwise expose its network connections. In this specific case, it intercepts the HTTPS requests made by a web view and overrides server trust evaluation, allowing you to browse a site whose certificate is not trusted by default.