Snooping on an iOS simulator hitting a server running on localhost has always been a thorn in my side. With macOS Sierra tools have once again changed and I've once again solved this problem using a neat little tool called
mitmproxy- via homebrew
brew install mitmproxy
- Edit your
/etc/hoststo add a local domain if you haven't already:
sudo vi /etc/hosts
127.0.0.1 l.local to the bottom.
- Reload your etc/hosts
sudo killall -HUP mDNSResponder
mitmproxyon the port (
-p) the simulator is configured to hit, redirecting (
-R) to the port your application is running locally.
mitmproxy -p3000 -R http://l.local:5000
See the requests and responses populate the