20

I run linux and use virtualbox to cross browser test my website. I have Windows10 and Windows7 within virtual box which allows me to test the site with IE and Edge browsers.

I have never used Apple/Mac OS so I am very much in uncharted territory here. I need to test the site on Safari but after searching online, it appears as though it isn't possible to download a MacOS ISO to install in virtualbox: link (I do not have access to an apple computer)

I tried installing Safari on a windows VM but it is a really old version since Safari is not supported on Windows. Also, from what I can tell there are no Linux versions of Safari.

Is there a way to test the site using Safari somehow without owning a Mac?

6
  • 2
    Basically no - you have to hae Apple hardware to run Apple software
    – mmmmmm
    Feb 15, 2017 at 15:09
  • 2
    You could try browserstack.com Feb 15, 2017 at 15:53
  • @Mark Not entirely true, I'm going to post an answer in a second.
    – JMY1000
    Feb 15, 2017 at 19:01
  • 2
    Developers should boycott apple, eventually with no apps made for apple they'll either have to open themselves more or lose customers :(
    – Tofandel
    Mar 12, 2020 at 14:51
  • 1
    @ChrisJAllen Uh it’s posted below, top answer ATM
    – JMY1000
    Aug 9, 2020 at 20:50

5 Answers 5

12

While it's not entirely the same thing, you could use one of the WebKit Linux ports to run "mostly Safari" on Linux. However, if you're intent on running macOS on non-Apple hardware, there are ways. However, note that these methods may violate Apple's macOS SLA.

According to Apple's macOS 10.12 SLA, you may use your limited, non- transferable, non-exclusive license:

to install, use and run up to two (2) additional copies or instances of the Apple Software within virtual operating system environments on each Mac Computer you own or control that is already running the Apple Software, for purposes of: (a) software development; (b) testing during software development; (c) using macOS Server; or (d) personal, non-commercial use.

From a technical perspective, there's nothing that would prevent you from running a VM on non-Apple hardware, though you would clearly be in violation of the SLA, and as such, I can't recommend you do this. However, if you decide to run a VM on Apple hardware, it's possible to create a compatible ISO. In any case, you'd need access to a macOS equipped machine.

Again, while clearly in violate of the SLA, there are methods to put macOS on non-Apple hardware, generally known as Hackintoshing. Again, I cannot condone this, but it is technically possible.

The easiest and most legally clear method is still to run Safari on Apple hardware, and that's what I'd recommend.

9

Simple answer would be No - there isn't. But there are some workarounds.

  1. Use inline service like browserstack

  2. Use old (unsupported) version of Safari on Windows

  3. Use browser which seems to have similar rendering engine:

For me going 3) helped to debug most of Safari rendering problems, so I can only recommend Gnome Web and Midori browser.

0
5

Safari is based on the WebKit rendering engine, though is of course exclusive to Apple hardware. Chrome, before forking its proprietary Blink rendering engine, was using WebKit so that is a somewhat close comparison.

The download page on the WebKit website links to a GTK port for Linux which might be enough to serve your purposes.

3
  • But that will only cover HTML and CSS not Javascript - and I think even on OSX Webkit browsers can behave differently to each other - let alone running on GTK rather than Cocoa
    – mmmmmm
    Feb 15, 2017 at 19:07
  • You are quite right that even among the WebKit browsers, behaviour can be quite different. I have personally experienced oddities that only Safari presents. The fact is, you can't run actual Safari without Apple hardware. That said, if you can get your hands on a Mac, perhaps the old computer of someone you know, Apple's Xcode IDE (free) includes an iOS simulator which works well for testing Mobile Safari as well.
    – Gwellin
    Feb 15, 2017 at 19:09
  • 3
    On ubuntu like Linux you can do apt-get install epiphany-browser to get Epiphany, the browser for Gnome that uses the webkitgtk mentioned in this answer. Jun 15, 2017 at 3:59
1

As @TomSaleeeba said i tried epiphany and i am seeing errors reported to me (which I wasn't seeing on firefox or chrome) by a client on my linux ubuntu 18 pc. I hope this can help someone else down the line trying to debug safari web issues

1

I had great success by using the macos-virtualbox script. It sets up a VirtualBox machine and magically downloads and installs MacOS in it. It took a great amount of time and disk space, but in the end I had MacOS running without needing access to any Apple device or to enter a license key.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .