Skip to content

Instantly share code, notes, and snippets.

@mudassir0909
Last active October 2, 2019 06:21
Show Gist options
  • Save mudassir0909/93483b0c15fc8e128ba37271a2e0da8e to your computer and use it in GitHub Desktop.
Save mudassir0909/93483b0c15fc8e128ba37271a2e0da8e to your computer and use it in GitHub Desktop.
Debug your website on a specific iOS Safari version from on a Mac

I recentlty had to fix a CSS bug that was only happening on a web view on a certain iPhone 7 and I tried replicating it on my iPhone but I couldn't.

Step 1: Determine the iOS Safari version

Since, WebView uses Safari underneath, I had to first determine which version of iOS Safari is installed. Turns out to know that you just have to know the iOS software version itself as Safari also mirrors the same version.

You can find that out inside Settings > General > About. Scroll until you find it. I found out the iPhone 7 had 11.2.X.

The following step assumes that either

  • You do not have an iPhone
  • Or you have a latest/different iOS version installed on your phone (I had iOS 13)

Step 2: Update your Xcode

Here's how to do that

Step 3: Installing iOS 11.2.X simulator

Download appropriate version

Step 4: Running the simulator on 11.2.X

Open the simulator app (cmd + space, type simulator)

@mudassir0909
Copy link
Author

mudassir0909 commented Oct 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment