# Recognize mobile operating system

**URL:** <https://forum.wixstudio.com/t/recognize-mobile-operating-system/32788>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [December 9, 2019, 11:56am UTC](https://forum.wixstudio.com/t/recognize-mobile-operating-system/32788 "2019-12-09T11:56:39Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![dafna-kotzer](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/dafna-kotzer/32/981_2.png) [@dafna-kotzer](https://forum.wixstudio.com/u/dafna-kotzer)\
**Post date:** [December 9, 2019, 11:56am UTC](https://forum.wixstudio.com/t/recognize-mobile-operating-system/32788/1 "2019-12-09T11:56:39Z")

</div>

Hi,  
How can I differ between ios and android?  
Thanks!

---

<div class="post-metadata">

**Author:** ![salman-hammed](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/salman-hammed/32/2576_2.png) [@salman-hammed](https://forum.wixstudio.com/u/salman-hammed)\
**Post date:** [December 9, 2019, 12:25pm UTC](https://forum.wixstudio.com/t/recognize-mobile-operating-system/32788/2 "2019-12-09T12:25:04Z")

</div>

Hey Dafna  
In js we can use navigator to detect the device  
but i am not sure wix code support it  
here is the stackoveflow answer  
[https://stackoverflow.com/questions/21741841/detecting-ios-android-operating-system](https://stackoverflow.com/questions/21741841/detecting-ios-android-operating-system)

we can build a custom code solution using tracking and analytic section  
but it requires a premium site to do so.

---

<div class="post-metadata">

**Author:** ![givemeawhisky](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/givemeawhisky/32/5383_2.png) [@givemeawhisky](https://forum.wixstudio.com/u/givemeawhisky)\
**Post date:** [December 9, 2019, 12:25pm UTC](https://forum.wixstudio.com/t/recognize-mobile-operating-system/32788/3 "2019-12-09T12:25:10Z")

</div>

I don’t think that you can actually define what sort of operating system your user is using like either iOS or Android, you can only define what the user is using device wise like desktop, tablet or mobile etc and code for that option by using Wix Window API and the formFactor function and writing code that only works on one of those three.

I think that what you are trying to achieve something like what is stated on this previous Stack post.  
[https://stackoverflow.com/questions/21741841/detecting-ios-android-operating-system](https://stackoverflow.com/questions/21741841/detecting-ios-android-operating-system)

---

<div class="post-metadata">

**Author:** ![lee1](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/lee1/32/2931_2.png) [@lee1](https://forum.wixstudio.com/u/lee1)\
**Post date:** [December 9, 2019, 4:42pm UTC](https://forum.wixstudio.com/t/recognize-mobile-operating-system/32788/4 "2019-12-09T16:42:43Z")

</div>

It’s trivial to fetch the user agent from inside an iframe and postMessage it back to the Wix page. Whether this would be janky as hell rather depends on what differences you had in mind.

---

<div class="post-metadata">

**Author:** ![dafna-kotzer](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/dafna-kotzer/32/981_2.png) [@dafna-kotzer](https://forum.wixstudio.com/u/dafna-kotzer)\
**Post date:** [December 9, 2019, 5:02pm UTC](https://forum.wixstudio.com/t/recognize-mobile-operating-system/32788/5 "2019-12-09T17:02:15Z")

</div>

Actually I need to know if it’s ios or android, & if it’s ios, I need to know the vesrion…

---

<div class="post-metadata">

**Author:** ![J.D](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/j.d/32/7312_2.png) [@J.D](https://forum.wixstudio.com/u/J.D)\
**Post date:** [December 9, 2019, 5:12pm UTC](https://forum.wixstudio.com/t/recognize-mobile-operating-system/32788/6 "2019-12-09T17:12:17Z")

</div>

@dafna-kotzer I used an iframe to get the OS and post it to the page But in the previous discussion someone (I think it was David) has mentioned that you can install the useragent npm for that.

---

<div class="post-metadata">

**Author:** ![dafna-kotzer](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/dafna-kotzer/32/981_2.png) [@dafna-kotzer](https://forum.wixstudio.com/u/dafna-kotzer)\
**Post date:** [December 9, 2019, 5:43pm UTC](https://forum.wixstudio.com/t/recognize-mobile-operating-system/32788/7 "2019-12-09T17:43:59Z")

</div>

@jonatandor35 will check. Thanks a lot!

---

<div class="post-metadata">

**Author:** ![julianogoulart](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/julianogoulart/32/16314_2.png) [@julianogoulart](https://forum.wixstudio.com/u/julianogoulart)\
**Post date:** [December 9, 2019, 10:28pm UTC](https://forum.wixstudio.com/t/recognize-mobile-operating-system/32788/8 "2019-12-09T22:28:58Z")

</div>

Hi @dafna-kotzer , how can I reach you privately? I’d have some services I need help with. thanks!

---

<div class="post-metadata">

**Author:** ![dafna-kotzer](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/dafna-kotzer/32/981_2.png) [@dafna-kotzer](https://forum.wixstudio.com/u/dafna-kotzer)\
**Post date:** [December 10, 2019, 8:22am UTC](https://forum.wixstudio.com/t/recognize-mobile-operating-system/32788/9 "2019-12-10T08:22:06Z")

</div>

[dafna@wonderwix.net](mailto:dafna@wonderwix.net)

---

<div class="post-metadata">

**Author:** ![vikasguptavkg](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/vikasguptavkg/32/26910_2.png) [@vikasguptavkg](https://forum.wixstudio.com/u/vikasguptavkg)\
**Post date:** [February 21, 2021, 2:00am UTC](https://forum.wixstudio.com/t/recognize-mobile-operating-system/32788/10 "2021-02-21T02:00:41Z")

</div>

Can someone elaborate on whether this worked. I need to do exactly the same thing where, based on iOS vs Android, I need to redirect to the appropriate app store.
