ain / smartbanner.js

Customisable smart app banner for iOS and Android
https://npmjs.com/package/smartbanner.js
GNU General Public License v3.0
621 stars 178 forks source link

Smart Banner ios version displayed for touch screen enabled desktops #503

Closed omkarvijf41 closed 2 years ago

omkarvijf41 commented 2 years ago

Steps to reproduce:

Here is the config used to render smartbanner `<meta name="smartbanner:title" content="Retire App” />

` Here is the device details navigtor.userAgent 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36' navigator.platform is 'Win32' and device resolution is 1920 X 1080

What happens: Smart Banner ios version displayed for touch screen enabled desktops chrome browser. I think the below snippet is causing this issue https://github.com/ain/smartbanner.js/blob/15b64d1238ca73d5b2d0f466f5b14a7530b926b5/src/detector.js#L10 this becoming true and detected as iOS What should happen:

Smartbanner should display for mobile android and ios platforms. Please let me know if any further details are required.

antomed commented 2 years ago

Same problem as described above. User agent details: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36 Original user agent (unchecked "Desktop site"): Mozilla/5.0 (Linux; Android 11; Redmi Note 8 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36