tutu/src/platform/host.ts
2024-08-12 17:25:03 +08:00

12 lines
No EOL
277 B
TypeScript

export function isiOS() {
return [
'iPad Simulator',
'iPhone Simulator',
'iPod Simulator',
'iPad',
'iPhone',
'iPod'
].includes(navigator.platform)
// iPad on iOS 13 detection
|| (navigator.userAgent.includes("Mac") && "ontouchend" in document)
}