Testing a website using Safari on Linux

isosafarivirtualization

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?

Best Answer

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.