John MacIntyre
John MacIntyre

Reputation: 13021

What is the iPhone equivalent to the \Windows\System32\Drivers\etc\hosts file?

I'm working on a web application and need to debug a problem occurring only on the iPhone.

I can reach the site on my dev box by typing its ip address into Safari (on my phone), but the domain is significant to the application, so I'm going to have to update my config in multiple places every time my IP changes.

What would be ideal is if I could configure the iPhone to always point to a specific IP when I enter a specific domain, just like the C:\Windows\System32\Drivers\etc\hosts file.

Is there a way to do that without jail breaking my phone?

Upvotes: 0

Views: 1820

Answers (3)

John MacIntyre
John MacIntyre

Reputation: 13021

I appended .local to the end of my computer name and it was able to resolve it.

It's not a perfect solution since I'll still have to adjust the settings in the app, but at least I won't have to keep changing it when my IP changes.

According to this answer on another SE site, it's Bonjour functionality.

Upvotes: 0

Dan Clarke
Dan Clarke

Reputation: 246

If you have jailbroken, I think it's /etc/hosts (same as the Mac OS X setup)

Upvotes: 1

JohannesRu
JohannesRu

Reputation: 160

You'd have to jailbreak your iPhone, another way would be to use a proxy. Hope I could help :)

Upvotes: 1

Related Questions