0

So I have implemented my own NSURLProtocol sub class. I registered it when app launches.

I tried to print all requests in canInitWithRequest:, however while running, it's not getting all the requests, just a few domains.

Is there anything I should notice or be careful? Any possible reasons? What did I miss? Thank in advance.

Wingzero
  • 9,644
  • 10
  • 39
  • 80

1 Answers1

0

It kind of depends on how you registered it. You can register it for use with NSURLConnection (and, IIRC, the shared NSURLSession), or you can register it for use with other NSURLSessions individually. If a request happens in a session that your protocol isn't registered in, your protocol won't see it.

dgatwood
  • 10,129
  • 1
  • 28
  • 49