Member-only story
Setting up proxy for the iOS Simulator
Often in an Enterprise environment the internet is shielded of from the office network. In other words, you will not able to be access certain URL’s whilst you’re on your office network.
In our case, our app was trying to parse an RSS feed from an URL that is only accessible through our company’s proxy server (http://proxy-access.company.com:8080).
I knew how to make use of a proxy server in the terminal (setting the http_proxy
and https_proxy
ENV variables), I also knew how to set it in my system:

Unfortunately neither of these options got picked up by the iOS Simulator. I also tried various other tricks but nothing worked. Until finally, one day, a colleague (Mario Negro Ponzi) taught me how.
It was actually pretty simple. The trick was to set the ENV variables from within Xcode:

Edit the main scheme, go to the Run tab and add two new environment variables there: http_proxy
and https_proxy
and set their values. That’s it!