3

I am running a local web server with SSL enabled that my app needs to log into. I have a domain name whose A-record is set to 127.0.0.1, which allows for local development using loopback with an nginx server with different subdomain configurations for services on the app I have hosted locally. The problem is that, in the iOS simulator, the domain resolves to the device's localhost and not my machine. I can't use the IP address of my machine because I need the domain for nginx to redirect to the proper vhost (also SSL and OAUTH would get mad).

Is there any way to use a custom DNS server for lookup in the simulator? Either that, or can I edit the hosts file to set the domain to my device's LAN IP instead of localhost? Any other ideas?

Kyle Hovey
  • 39
  • 1
  • 1
    Does this answer your question? [Editing the iPhone Simulator hosts file](https://stackoverflow.com/questions/3648764/editing-the-iphone-simulator-hosts-file) – chiliNUT Oct 31 '20 at 22:39
  • 2
    @chiliNUT after XCode 6 that no longer works (and I tried). I'm using XCode 12. – Kyle Hovey Nov 02 '20 at 16:37

0 Answers0