To set up packet capture from your iPhone, plug it into your mac with a wire.
Get the UDID identifier for your iPhone from the Devices and Simulators window in Xcode. The identifier will have a dash after the 8th character. Copy the entire string including the dash.
In the terminal, enter ‘rvictl -s’ followed by the identifier, as in:
‘rvictl -s XXXXXXXX-XXXXXXXXXXXXXXX’
If it succeeds, you should see:
“Starting device XXXXXXXX-XXXXXXXXXXXXXXX [SUCCEEDED] with interface rvi0”
Note the interface identifier is ‘rvi0.’ Open up Wireshark. You should see that interface identifier in the home window of Wireshark.
Double click it:
Now you are seeing packet captures from your iPhone! We’ll get into more details next.