I'm attempting to inspect http (non-SSL) traffic using XCode 6.1 and iOS Simulator 8.1 using Charles and my localhost apache server.
I've got Charles working correctly, but it only captures traffic when I use my local network IP address: 192.168.1.X
as the target host for requests in iOS.
I've tried the other suggestions from the Charles article here, but none work except for the local network IP address.
"Why not just use the local network IP?", you ask?. Well, I'd like to avoid YASCE (yet another source control exception). You see, my source code has this in networking section:
#if DEBUG
var API_HOST = "http://localhost"
#else
var API_HOST = "https://website.com"
#endif
I'd like to avoid forcing every developer on the team to constantly make special considerations to avoid checking in their own personal IP address every time they are committing to source control.
Is there another way that I can convince the iOS simulator to pass http://localhost
through Charles, or is there a better way to handle environment-specific settings with a development team?