Editing the iPhone Simulator hosts file

后端 未结 1 997
天涯浪人
天涯浪人 2021-02-11 16:27

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. htt

1条回答
  •  梦谈多话
    2021-02-11 17:21

    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.

    0 讨论(0)
提交回复
热议问题