How to use XCode iOS Simulator for responsive web testing on Mac

Test your website on every iOS device

Ali Kamalizade
3 min readOct 23, 2018


With iOS remaining the only competitor to Android in the mobile market (especially when you look at the higher price range, the gap shrinks), web developers cannot neglect to optimize web pages for iOS. The web browser of choice for iOS users will most likely be Apple Safari. With the rise of Progressive Web Apps (PWA), users expect high quality apps not only as native apps but also in their browser.

So how can you you test your web page on Safari for iOS?

  • Manual testing on real iOS devices.
  • Using cross-browser testing services like Browserstack. Performance is usually alright and they offer various features but they are usually not free and debugging is often cumbersome.
  • Use XCode simulator to emulate an iOS device.

In this tutorial, we will look at how you can use the XCode simulator to debug a web page. XCode is a free IDE available for Mac devices used for developing all kind of apps for Apple devices: iOS apps, Mac apps, Watch apps and more. In our case, we will make use of the emulation capabilities XCode provides.

Let us have a look why we should use XCode Simulator to test our web pages.

Advantages of using XCode Simulator for web testing

  • Good performance even on older Mac devices. Most web pages and even single page applications should work flawlessly.
  • Debugging with Safari developer tools is possible so you can use all features the developer tools have to offer like setting breakpoints.
  • Changes in your code are reflected automatically (either reload the web page or use a Live Reload / Hot Module Reload solution).
  • You can use all iOS devices to test your web apps: e.g. iPad Pro, iPhone X, iPhone 8, …
  • XCode is free to download so it is easy to use it.

Disadvantages of using XCode Simulator for web testing

  • Works only on Mac as Safari is only available on Mac.



Ali Kamalizade

Co-founder of Sunhat. Posts about software engineering, startups and anything else. 有難うございます。🚀