Closed elliotwutingfeng closed 10 months ago
Thank you for reporting this, it seems like iPad safari pretends to be on desktop https://developer.apple.com/forums/thread/119186
Can you check if it detects it correctly now?
Yes the correct error message shows up on iPadOS 17.2 Safari now. I think iOS Safari (for iphones) also pretend to be desktop as well.
const isIpad = navigator.userAgent.includes("Macintosh") && navigator.maxTouchPoints >= 1;
It should hopefully work on iOS 12 (still supported by Apple) as well because navigator.maxTouchPoints
is undefined on iOS 12 and below, but the &&
prevents that from being evaluated. I don't have an iOS 12 device though.
Model: iPad Pro 2022 12.9 inch OS: iPadOS 17.2
Expected behavior: "iOS is not supported." message should be displayed on iOS Safari, just like how it currently does on iOS Chrome.
Actual: iOS Safari browser attempts to load the site for a while before crashing.