-1

Is there a library or plugin out there that will allow me to capture all network requests made by my iOS application (in DEBUG mode only of course) and store the requests in a file?

I am aware of Pony Debugger, but it only let's you view the network requests in Chrome Developer Tools Dashboard. I want an actual file I can process at a later time.

1 Answers1

1

I find myself using Charles http://www.charlesproxy.com/ fairly often. You can use it to proxy in the simulator or you can set turn the proxy on and then proxy your iOS device over it. It's also nice to simulate network problems like latency and slower speeds (you can use network link conditioner as well but it's a pain to keep going back to the settings app). They have a free trial so you can decide if it's right for you.

If your using AFNetworking there is a library, AFHTTPRequestOperationLogger that will allow you to easily print all requests and responses to the console. I know it's not a file but with a little work you could pull the logs off your device for later inspection.

Lastly if those options don't suite your fancy you can roll your own solution with NSURLProtocol. It probably wouldn't be much work and there is a ton of information out there on it. NSHipster did a writeup a couple of years ago http://nshipster.com/nsurlprotocol/.

Brandon
  • 2,387
  • 13
  • 25