25

My iOS 8 Simulator is not using my proxy settings anymore (I want to debug with Charles). The rest of the system does. The simulator somehow seems to get direct internet access. Have I missed some new setting?

Caution: this is NO dup of How to use Charles Proxy on the Xcode 6 (iOS 8) Simulator?. I´m not trying to use SSL on the simulator in the first place. My simulator doesn´t even start to use the proxy.

Charles:

Proxy Settings

System:

Connection Proxy Settings

Community
  • 1
  • 1
stk
  • 6,311
  • 11
  • 42
  • 58
  • 2
    iPhone simulator always uses the network settings of your mac. Check if your machine is connected with both ethernet and wifi at same time. try switching off 1 of the network connection and than check again. – Dinesh Sep 26 '14 at 11:16
  • It´s only connected via Ethernet and only on this connection the proxy is set. – stk Sep 26 '14 at 11:17
  • I am pretty sure that this is not an issue with simulator but with your network settings than.. Check properly if network is properly configured to use the proxy settings only.. – Dinesh Sep 26 '14 at 11:20
  • I updated my question with screenshots, please see above. – stk Sep 26 '14 at 12:37
  • Simply restart the iPhone simulator. for this i use the following trick go to setting >> General >> Accessibility >> bold text to switch on >> picker view open and ask for restart for make it effective >> press continue >> iPhone simulator now restart the pop-up ask for user name and password for proxy. (suggested by someone else on internet) – Dinesh Sep 29 '14 at 06:05
  • @Dinesh: Thanks, but doesn´t work for me. Further, I don´t need authentication for my proxy. – stk Sep 29 '14 at 09:12
  • @stk: Have you resolved this issue? I am also facing same issue. I am able to access the URL in Mac Browser, but when trying to access the same inside ioS Simulator safari i could not connect with server. Any idea? I did restart and reset simulator. nothing helped me. – Mavericks Oct 28 '14 at 06:17
  • For me the selected right answer did work... – stk Oct 29 '14 at 10:46

3 Answers3

55

Restart the simulator between proxy changes

Vetsin
  • 2,245
  • 1
  • 20
  • 24
5

This is correct. Proxy settings that are setup on the host are not necessarily usable by the simulated runtime. If your proxy server requires authentication, you will not be able to use it in the iOS Simulator due to the simulator and host not sharing the same keychain. If you rely on this functionality, please file a radar at http://bugreport.apple.com and request an alternative.

Also note that this is discussed in the Xcode 6 Release Notes:

  • iOS Simulator does not support the use of network proxy servers that require authentication. (14889876)
Jeremy Huddleston Sequoia
  • 22,938
  • 5
  • 78
  • 86
0

Do not forget the HTTPS:

  1. Set Web Proxy (HTTP) and Secure Web Proxy (HTTPS)
  2. Restart the simulator after proxy changes
Nianliang
  • 2,926
  • 3
  • 29
  • 22