Kodeco Forums

NSURLProtocol Tutorial

NSURLProtocol is the lesser known heart of the URL handling system in iOS. In this NSURLProtocol tutorial you will learn how to tame it.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/2509-nsurlprotocol-tutorial

This needs to be changed to as follows to avoid iOS crashing when using large video downloads:
[[NSURLResponse alloc] initWithURL:[[NSURL alloc] initWithString:self.request.URL.absoluteString]

Hi Ray

Does NSURLProtocol not work for the new WKWebView? I tried it and I was not able to intercept the asset load requests in "+ (BOOL)canInitWithRequest:(NSURLRequest *)request " made from within my WKWebView. Here is a related post ios - WKWebView and NSURLProtocol not working - Stack Overflow

Do you have any information regarding this?

Thanks in Advance

This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]