platform

returns the name of the operating system LiveCode is running on.

# Metadata

Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android, web Introduced: 1.0 Security:

# Syntax

the platform

# Examples

the platform

if the platform is "MacOS" then set the activatePalettes to true

# Description

Use the platform function to change a stack behavior or appearance depending on the operating system.

The platform function is compiled into each version of the LiveCode engine. This means that, for example, if you're developing on a Mac OS and you build a standalone application for Unix, when you run the standalone application on a Unix system, the platform function returns "Linux".

The possible values returned by the platform function are:

* "Win32" on any version of Windows * "Linux" on all Linux distributions * "MacOS" on any version of Mac OS X * "iphone" on iPhones, iPads and other iOS devices * "android" on smartphones, tablets and other Android devices * "web" when running in a web browser

# Tags

# See

- **control structure:** function - **object:** stack - **glossary:** return, OS X, engine, appearance, Unix, Mac OS, standalone application, behavior - **function:** systemVersion, buildNumber, deleteRegistry, processor, MCISendString