mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2025-12-27 02:44:26 +01:00
22 lines
593 B
TypeScript
22 lines
593 B
TypeScript
// https://stackoverflow.com/questions/9038625/detect-if-device-is-ios
|
|
|
|
import { Capacitor } from "@capacitor/core";
|
|
|
|
export function iosNotNative() {
|
|
if (Capacitor.isNativePlatform() || Capacitor.getPlatform() === "ios") {
|
|
return false;
|
|
}
|
|
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)
|
|
);
|
|
}
|