I'm working on a hybrid application framework. I needed to catch all request from somewhere and i fond some blog it says i can do that with using custom NSURLProtocol. I did everything it says but i have some problems.
When i load http://www.google.com to my webview, it calls canInitWithRequest for 5 times in mycustomprotocol.m. but i dont want to call 5 times.
- 2014-03-13 15:51:50.675 Hybrid[9334:60b]
 http://www.google.com/- 2014-03-13 15:51:50.677 Hybrid[9334:60b]
 http://www.google.com/- 2014-03-13 15:51:50.683 Hybrid[9334:60b]
 http://www.google.com/- 2014-03-13 15:51:50.685 Hybrid[9334:60b]
 http://www.google.com/- 2014-03-13 15:51:50.686 Hybrid[9334:60b]
 http://www.google.com/- 2014-03-13 15:51:54.474 Hybrid[9334:3807]
 http://www.google.com/- 2014-03-13 15:51:54.508 Hybrid[9334:3807]
 http://www.google.com/images/logo_ret_2.png- 2014-03-13 15:51:54.509 Hybrid[9334:3807]
 http://www.google.com/images/logo_ret_2.png- 2014-03-13 15:51:54.510 Hybrid[9334:3807]
 http://www.google.com/images/logo_ret_2.png
I only loaded google for once. Why is canInitWithRequest calling five times before startLoading?
Please Help!