isAndroid, isIOS, isWindows, isMacOS, isLinux, isWeb, isMobileWeb,
Description
Boolean properties that tell you which platform the app is running on. Each returns true on that platform and false everywhere else.
| Property | Description |
|---|---|
isAndroid | Whether the app is running on an Android device |
isIOS | Whether the app is running on an iOS device |
isWindows | Whether the app is running on Windows |
isMacOS | Whether the app is running on macOS |
isLinux | Whether the app is running on Linux |
isWeb | Whether the app is running in a web environment |
isMobileWeb | Whether the app is running in a mobile web environment |
Parameters
None (property)
Returns
bool
Example
if ($app.isAndroid || $app.isIOS) {
var state = $app.getFoldableState();
$log.i("Foldable state: " + state);
} else {
$log.i("플랫폼: " + $app.operatingSystem);
}
Related
$app.operatingSystem— operating system name as a string$app.getFoldableState()— reads the foldable device state (mobile only)