Simulate Iphone Safari On Mac

  1. The full-featured iOS and Android emulators and simulators work just like actual devices and include development-related features such as device logs, locale changes and session recordings. A solution for everyone. Whether you are a start-up or an enterprise, Appcircle has a solution for you. A solution for everyone.
  2. Jan 27, 2021 Mac users can directly launch their apps from the Xcode project. What gives Safari an edge over other free iPhone emulators is the ability to test web apps by accessing Safari within Xcode.

Recently, I have been working on improving mobile support in the content produced by our PDF to HTML5 converter. One problem that I have encountered is how to debug iOS Safari, particularly if you are not a Mac user.

If you are a web developer, you are likely very familiar with the tools available to you when debugging a web page or web app in a desktop browser, but how do you debug when developing for a mobile device such as the iPad or iPhone?

The answer is that you debug remotely, using the same tool as you would on desktop, except connected to your mobile device. If you are debugging Safari on iOS this will require Safari version 6 and up. Windows & Linux developers will be disappointed to hear that the latest version of Safari available for Windows is version 5, and it’s not available at all on Linux.

Nov 16, 2018 Several popular web-based browser testing services make it possible to test iOS's Mobile Safari, but the best of these tools require an additional fee, have limited free features, or restrict the number of users who can use an account at the same time. Apple makes iOS testing available for free to all macOS users, with their Simulator app.

If you don’t own or have access to a Mac this can be very frustrating (though I would not say it’s the most frustrating thing about developing a web app for iOS, there are many). It would be great if Apple offered Virtual Machines with Safari pre-installed for testing, as Microsoft does for Internet Explorer. Fortunately, all is not lost – there are some alternatives available which I will discuss below.

Remote Debugging iOS Safari on OS X:

Firstly, you need to have a device running iOS, such as an iPad or an iPhone that you can connect by USB to a Mac computer with Safari version 6 onwards installed.

Next, you need to enable ‘Web Inspector’ on your iOS device. You can do this by going to Settings > Safari > Advanced, and toggling Web Inspector so that it is enabled.

Then, you need to enable the Develop menu in Safari on your Mac computer if it is not already enabled. You can do this by going to Safari > Preferences > Advanced, and ticking the check box for Show Develop menu in menu bar.

Now, if your iOS device is plugged in to your computer with the web page you wish to debug currently open, you can go to Develop > iOS Device Name in desktop Safari, and click on the page you wish to debug.

You can now view and update the DOM, access the JavaScript console and more.

Remote Debugging iOS Safari on Windows and Linux:

[Update – Jan 2019] Since writing this article, the recommended solution is no longer available. There is however a new tool which allows you to debug iOS Safari using the Chrome Web Developer tools. You can find instructions for setting this up here: RemoteDebug iOS WebKit Adapter. I have tested this tool (in January 2019) and can confirm it is working.

There are very few options available to the web developer using Windows, and even fewer for those using Linux. Apparently, the Telerik Platform AppBuilder includes a Chrome Developer Tools capable of remote debugging pages in Safari. You can find a guide for doing that here. Be aware that this is not a free solution.

In my option, the best solution for debugging Safari on Windows and Linux is to use a really cool web app called JSConsole. JSConsole works by inserting a script tag into your web page that overrides the console behavior. Rather than writing logs and errors to a console you can’t see, instead they will be streamed to a jsconsole session open in your desktop web browser that will be listening to your device.

To start, go to jsconsole.com and run :listen in the prompt. This will give you a unique session ID and a script tag that you insert into your mobile web page.

Now, any console output that your mobile page generates will be streamed to the console open in your desktop web browser, including any errors!

It is certainly no replacement for a full web inspector, but it can get you out of trouble when you don’t have access to a Mac.

If you found this article useful, feel free to try our PDF to HTML5 converter online for free.


Watch how to use our PDF Viewer JPedal

Simulate Iphone Safari On Mac Os

How to simulate iphone on mac

TestArchitect allows you to create and run automated tests of web applications in Safari on a simulated iOS device.

Ios Safari Emulator

Ensure that the Interface Viewer is closed prior to running automated tests.

Apple’s Simulator allows you to rapidly prototype and test builds of your app during the development process. Installed as part of the Xcode tools, Simulator runs on your Mac and behaves like a standard Mac app while simulating an iPhone, iPad, Apple Watch, or Apple TV environment. (Learn more.)

Note:
At present, TestArchitect only supports automation on Simulator for iOS, not watchOS or tvOS.

Supported iOS versions

Is Safari Better For Mac

TestArchitect supports the testing of web applications running within the Safari browser on the following versions of a simulated iOS device:

  • iOS 8.4
  • iOS 8.3

Technological approach

  • Remote debugging is a remote web inspector for debugging web applications on the iOS Simulator. The following configuration must be set up to allow remote debugging to be performed:

    • Enable Web Inspector of Safari on iOS Simulator (Learn more.)
  • Event-fired action model: TestArchitect attempts to effectuate built-in actions in a manner that is as close as possible to real user actions. In most cases, for each given UI action, TestArchitect calls a sequence of events as follows. (Refer to supported built-in actions.)

    Built-in actionsApplicable controlsSequence of events triggered
    click, tapall controlstouchstart >touchend >mouseover >mousedown >focus >mouseup >click
    click table celltabletouchstart >touchend >mouseover >mousedown >focus >mouseup >click
    set list checkul, oltouchstart >touchend >mouseover >mousedown >focus >mouseup >click
    select, click list itemselect-one, select-multipleclick >change
    setinput-checkbox, input-radiotouchstart >touchend >mouseover >mousedown >focus >mouseup >click
    enter, setinput-text, input-password, input-search, input-tel, input-url, input-email, input-numberkeydown >keypress >input >keyup >change

Simulate Iphone Safari On Mac Computer

Simulate

Iphone Safari Plug-ins

Configuring an iOS Simulator for testing Safari
This section describes essential configurations needed to ensure that automated tests on Safari on the iOS Simulator run successfully and stably.
Invoking Safari on iOS Simulator during automation
There are two methods by which Safari may be invoked in the iOS Simulator:
Automation testing on Safari in iOS Simulator
After having completed the prerequisites, you can now start to automate your tests on Safari in the target iOS Simulator.