How can I debug network requests from my iPhone?

◇◆丶佛笑我妖孽 提交于 2019-12-21 21:25:46

问题


I want to check the network requests an app is making from my iPhone. It's on the same WiFi network as my computer (or if it makes things easier, I can set it up to use an ad-hoc network). I don't want to see every packet, just the URLs which my iPhone is requesting. I don't care about the returned data all that much.

A simple solution would be much appreciated.


回答1:


If you want to intercept the phone itself you'll need to point it at an http proxy you set up on a computer and watch the requests come through. Something like http://www.charlesproxy.com/ or there are most likely many free proxies.




回答2:


  1. Connect your computer to the rest of your local network via Ethernet.
  2. Turn on Internet Sharing from the Sharing System Preference to share your Ethernet connection via AirPort.
  3. Set your iPhone to connect to the computer as its base station.
  4. Use Wireshark to capture and analyze the packets.


来源:https://stackoverflow.com/questions/3924633/how-can-i-debug-network-requests-from-my-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!