nevan king
nevan king

Reputation: 113747

How can I debug network requests from my iPhone?

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.

Upvotes: 3

Views: 6172

Answers (4)

Jonny
Jonny

Reputation: 16298

You can use the Instruments app for this. Try the "Network" profiling template. It even shows network data related to requests from your app, as well as other processes of the device, like the OS itself.

Instruments templates screenshot

Upvotes: 0

Eldin SMAKIC
Eldin SMAKIC

Reputation: 39

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.

  • Easy to install
  • Transparent on your app usage
  • Overview and details of your request

Like so Screenshot of wormholy usage

Upvotes: 3

Jay O'Conor
Jay O'Conor

Reputation: 2495

  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.

Upvotes: 2

Ben
Ben

Reputation: 2992

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.

Upvotes: 8

Related Questions