Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 12.1   12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3   13.4    Statistic    FMM    Blog  

IsMacOS

Whether we run on Mac.

Component Version macOS Windows Linux Server iOS SDK
Plugin 6.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "IsMacOS" )

(old name: IsMacOSX)

Parameters

none

Result

Returns 1, 0 or error.

Description

Whether we run on Mac.
Returns 1 if running on macOS and 0 if not.

See also IsWindows, IsLinux and IsIOS.

Examples

Register LibXL for MBS Plugin

If [ MBS("XL.IsInitialized") ≠ 1 ]
      If [ MBS("IsMacOS") ]
            Set Variable [ $r; Value: MBS( "XL.Initialize"; $path; "xxx"; "mac-xxx" )]
      Else If [ MBS("IsWindows") ]
            Set Variable [ $r; Value: MBS( "XL.Initialize"; $path; "xxx"; "win-xxx" )]
      Else If [ MBS("IsLinux") ]
            Set Variable [ $r; Value: MBS( "XL.Initialize"; $path; "xxx"; "linux-xxx" )]
      Else If [ MBS("IsIOS") ]
            Set Variable [ $r; Value: MBS( "XL.Initialize"; $path; "xxx"; "ios-xxx" )]
      Else
            Set Variable [ $r; Value: "new platform?" ]
      End If
      If [$r ≠ "OK"]
            Show Custom Dialog ["Problem with LibXL Registration"; $r]
      End If
End If

See also

Blog Entries

This function is free to use.

Created 2nd March 2016, last changed 25th November 2020


IsLinux - IsMobile

💬 Ask a question or report a problem