Subclassing NSURLProtocol and NSURLCache appear to be two established approaches to allowing JavaScript communication from a UIWebView to native iOS code.
Both allow you to intercept NSURLRequests made by a UIWebView and return arbitrary response data.
Both techniques have performance sufficient for my requirements.
So, performance time aside, is there any reason why I should prefer one approach over the other?
For reference an example using NSURLProtocol and an example using NSURLCache: