I am trying to test http traffic (non-SSL) using Xcode 6.1 and iOS Simulator 8.1 using Charles and my apache localhost server.
Charles works correctly for me, but it only captures traffic when I use my LAN IP: 192.168.1.X as the target host for requests in iOS.
I tried other suggestions from Charles's article here , but no one works except the LAN IP.
βWhy not just use the IP address of the LAN?β You ask ?. Well, I would like to avoid YASCE (another exception for source control). You see, my source code has this in the network section:
#if DEBUG var API_HOST = "http://localhost" #else var API_HOST = "https://website.com" #endif
I would not want every developer in the team to constantly make special comments so as not to check their own IP address every time they take control of the source.
Is there any other way I can convince the iOS simulator to pass http://localhost through Charles, or is there a better way to handle the environment settings with the development team?
ios xcode proxy configuration charles
Albert bori
source share