Friday, August 7, 2015

How to capture TCP dump in iPhone?

1. Need a Mac PC.
2. Install Xcode in the Mac
 - check UDID
 - execute rvictl command
3. Run Xcode > Window > Devices
 iPhone > Identifier
4. Run Terminal
 $ rvictl -s

 # start capturing TCP dump
 $ sudo tcpdump -i rvi0 -w trace.pcap

 # stop capturing TCP dump
 $ rvictl -x

* Reference
https://developer.apple.com/library/mac/qa/qa1176/_index.html
http://useyourloaf.com/blog/2012/02/07/remote-packet-capture-for-ios-devices.html