Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for iPad on iOS 13 #109

Closed
gk1041 opened this issue Oct 16, 2019 · 3 comments
Closed

Add Support for iPad on iOS 13 #109

gk1041 opened this issue Oct 16, 2019 · 3 comments

Comments

@gk1041
Copy link

gk1041 commented Oct 16, 2019

For iPad on iOS 13 the term iPad no longer appears in the user-agent. The user agent for iPad on iOS 13 is this:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko)

The solution to check for iPad on iOS is:

let isIOS = /iPad|iPhone|iPod/.test(navigator.platform) ||
(navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);

Reference to solution here: https://stackoverflow.com/a/58064481/3787150

@kaimallea
Copy link
Owner

Thanks for reporting this, will take a look!

@WookashWackomy
Copy link

Hey @kaimallea. Any updates on that matter?

kaimallea pushed a commit that referenced this issue Apr 12, 2020
isMobile now accepts either a useragent string or navigator-shaped object. The latter enables
inspection of navigator properties to detect iPad on iOS 13.

re #109
@kaimallea
Copy link
Owner

Added in #109

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants