How can I detect the current operating system in my react js PWA project.I have used process.platform but it gives "undefined".Please help
Asked
Active
Viewed 947 times
0
-
You can refer this post: https://stackoverflow.com/questions/38241480/detect-macos-ios-windows-android-and-linux-os-with-js – Manoj Feb 11 '21 at 02:56
1 Answers
1
Your best bet is const platform = window.navigator.platform
Praveen Nambiar
- 4,766
- 1
- 20
- 31
-
It worked for me can you please give me the possible values for the operating systems – Sahan Thilakarathna Feb 11 '21 at 03:16
-
-
-
-