is it possible to edit the hosts file of the iPhone simulator?
I'm working on a REST API and I need to be able to access my local site using a correct domain (e.g. http://api.local.com)
Jailbreak your iPhone, download iFile, navigate to /etc/ and open the file called hosts in the text viewer. Now you can edit it.
An iOS does have a hosts file and it incorporates IP addresses and hostnames mappings. This is the same as DNS, though you can control it locally and does take emphasis over the DNS. This enables you to put in local and manual overrides for the entries.
type: ~/Library/Application Support/iPhone Simulator.
You can simply edit your Mac's /etc/hosts
file and iPhone Simulator will adopt whatever is set there.
It works because the iPhone Simulator simply provides a simulated frontend of Mobile Safari's user interface, which just uses your Mac's network settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With