mazey
    Preparing search index...

    Function isIOS

    • Check whether a user agent represents iOS or iPadOS.

      Without an argument, the function reads the current navigator.userAgent. It also recognizes iPadOS browsers that identify as macOS by checking the current navigator.platform and navigator.maxTouchPoints compatibility signals. An explicit user agent is classified by that string alone.

      Usage:

      import { isIOS } from "mazey";

      const result = isIOS();
      console.log(result);

      Possible output:

      true
      

      Parameters

      • OptionaluserAgent: string

        Optional user-agent string. Defaults to the current browser's user agent.

      Returns boolean

      true for recognized iOS or iPadOS user agents; otherwise false.

      If an explicitly supplied user agent is not a string.

      Safe during SSR and in Node.js. User-agent detection is heuristic and spoofable; do not use this result as a security boundary.