Editing the iPhone Simulator hosts file

Deadly 提交于 2021-01-20 23:20:21

问题


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)


回答1:


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.



来源:https://stackoverflow.com/questions/3648764/editing-the-iphone-simulator-hosts-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!