bestiejs/platform.js

Can we detect Apple M1/ARM machines?

Opened this issue · 0 comments

Jehan commented

We use platform.js on a website to show the right "download button" for our application (GIMP). For instance, Windows people would get the Windows installer button, macOS people would get a DMG download and Linux people would get a Flatpak link.

It's of course only a default and there are links to show and get downloads for other platforms, but it has been very nice so far to be able to guess the expected binary to show (instead of 10 buttons to choose from) at first.

Lately we are getting a DMG package for Apple M1 (arm 64-bit Apple machines). We are trying to find out how to detect this. Does the current version of platform.js provide an info which is reliable enough to guess which architecture variant of macOS one is using?