level TCP methods on IOS
I am trying to find a way to get information on all the TCP traffic to and from my IOS application. The application is very simple and composed of a single UIWebView object.
I tried to use swizzling on NSURLRequest but didn't have much luck with that - my version of requestWithURL: is called when I call it NSURLRequest manually, but it doesn't seem to ever be called when going to a page in UIWebView, so I guess its using a different object under the covers.
So I thought of trying to hook into CFSocket functions, but those are not part of a class so I'm not sure how to swizzle them (or if its even possible).
Are there any ways to hook into C functions on IOS, or any other APIs I can try to swizzle to access TCP (or even HTTP) traffic?
I also tried using NSURLCache, which works for most of the main .html pages, but as many people have found out the .cs files and some others don't seem to go through the cache.
Thanks!
Just set up an external proxy like Fiddler or Charles to monitor http traffic. Or more complicated, Wireshark for any tcp traffic. This will be much easier than what you're trying and more powerful.
链接地址: http://www.djcxy.com/p/21742.html下一篇: IOS上的高级TCP方法