Internet Sharing site to iPhone from Mac

Has anyone tried or managed to successfully ‘Internet Share’ their Local localhost server to a connected iPhone on a mac via Internet Sharing?


For me, and I’m sure others, ngrok works great for some use cases, but the free tier just doesn’t give me enough in its rate limit to be workable. I can debug a site in the safari console using a wired connection, but this is only possible on production/remote sites. Next challenge is accessing my local site on the phone, in order to debug in the real environment. There are too many inconsistencies between desktop and phone browsers.

I don’t have an iPhone, so I’ve never tried that, but when I’m doing cross-device testing, I’ll often use browser-sync to watch for changes and propagate events across browsers.

This reply has more info:

Note that when you run browser-sync, it will show you an “External URL” which you can use for any device that is on the same network as your dev machine.

My workaround for this is a bit different. Instead of sharing sites so my real iPhone can see the sites, I just use the iOS Simulator that comes with Xcode. Since native macOS and iOS apps are the other side of my programming world (besides WP) I have the tools already. It just seems simpler. But I understand that for only this use, those tools would be quite heavy.