Debugging an iPhone’s network traffic.

One of the most frustrating things when writing an iPhone app (now that we have Swift to banish the hell that is Objective-C!) is the lack of debugging tools, in particular not having Wireshark available.

Fret no more however. It turns out that you can  mirror all your iPhone network traffic to your Mac by exposing a virtual network interface.

Simply launch Terminal, and enter:

$> rvictl -s <UDID of Phone>


$> rvictl -s 4738101a4a910ffa9e368ef683fb2135dec12716

Starting device 4738101a4a910ffa9e368ef683fb2135dec12716 [SUCCEEDED] with interface rvi0

(your UDID can be determined via iTunes)

This will create a new network interface called rvi0 (or whatever the success message tells you) that you can listen on with Wireshark.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s