Your new front end best friends: ngrok and Safari mobile dev tools

Jul 14, 2020

TLDR: Inspect the browser of your mobile phone using Safari mobile dev tools, using only Safari and ngrok.


Three things have eluded humans since we gained consciousness, “Why are we here?”, “How did we get here?”, and “Why doesn’t it look the same on my phone as it does on my computer?”.  I am here to help answer address the last one.

Life is full of mystery 

As a member of a startup working on the front-end, we only have so much time. I would love to handle all the edge cases, but at the moment, iPhone users are my concern.

Mobile Operating System Market Share: USA
Mobile Operating System Market Share: USA

But what about the other ~40%? Frankly, it is too fragmented to prioritize. Within that ~40%, you have multiple different vendors, screen sizes, and operating systems. For an MVP, you need to pick your fights.

Mobile Vendor Market Share: USA
Mobile Vendor Market Share: USA

Now that we see the reason to develop for iPhone, what browser? Answer: Safari.

But Joe, no one uses Safari.

Correction, everyone uses Safari; they don’t realize it.

First, we need to understand that all browsers on iOS use the Safari WebKit rendering engine.

App Store Review Guidelines - 2.5.6
Does Safari and Google Chrome for macOS use the same rendering engine?
Does Safari and Google Chrome for macOS use the same rendering engine?

Second, we need to understand that the first time a user sees your site, it will most likely be via a message, email, or social media link. iOS doesn’t allow users to change the default browser to open the link. When you click the link, it opens the link using the default web browser - Safari.

Third, current dev tools and responsive design tools only get you so far. I know that I will find some issues after I push to production even if I tried my best to break it on my machine.

What to do?

Now we have our local machine (localhost) being served via a publicly accessible URL and have dev tools open on our computer.

No more guessing and figure out where things are breaking.  Simply select the page element and watch it highlight on your device.

:: Check out the gif and video examples below! ::

The examples are overlaying a screen recording of my computer and my mobile device synced in real-time.

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.