如何调试来自 iPhone 的网络请求?
我想检查应用程序从我的 iPhone 发出的网络请求。它与我的计算机位于同一个 WiFi 网络上(或者,如果这会让事情变得更容易,我可以将其设置为使用临时网络)。我不想看到每个数据包,只想看到我的 iPhone 请求的 URL。我不太关心返回的数据。
一个简单的解决方案将不胜感激。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
通过以太网连接您的本地网络。
共享系统偏好设置共享
您的以太网连接通过
飞机场。
连接到计算机作为基础
车站。
捕获并分析数据包。
of your local network via Ethernet.
Sharing System Preference to share
your Ethernet connection via
AirPort.
connect to the computer as its base
station.
capture and analyze the packets.
如果你想拦截手机本身,你需要将其指向你在计算机上设置的 http 代理并观察请求的通过。像 http://www.charlesproxy.com/ 之类的东西,或者很可能有很多免费代理。
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.
我在 github 上发现了一个非常好的仓库,名为 Wormholy https://github.com/pmusolino/Wormholy 它将显示您 iPhone 上的每个网络请求,您只需将其添加到您的 pod 文件中,然后在您的应用程序上,摇动手机即可看到所有请求。
像这样
wormholy 使用截图
I found a really nice repo on github named Wormholy https://github.com/pmusolino/Wormholy it will show every network request on your iphone, you only add it to your pod file and then on your app, you shake your phone and you will see all requests.
Like so
Screenshot of wormholy usage