System Variables and Flags (ssk.system.*)
Actual Environment Flags
These variable will tell you the ACTUAL Operating System you are running in now (whether you are running in the simulator, a device, or a destkop build).
Syntax | Summary |
---|---|
onSimulator | true if running on Corona SDK simulator. |
oniOS | true if running on iPhone or iPad. |
onAndroid | true if running on any Android device. |
onAmazon | true if running on Amazon device. |
onNook | true if running on NOOK device. |
onWinPhone | true if running on Windows phone. |
onAppleTV | true if running on Apple TV device. |
onAndroidTV | true if running on Android TV device. Not 100% reliable. |
onOSX | true if running on machine using OS X operating system. |
onWin | true if running on machine using Windows (7/8/10/..) operating system. |
onDesktop | true if onOSX or onWin is true . |
onDevice | true if running on a mobile device. |
Target Environment Flags
If you are running in the simulator, these flags will reflect the current skin OS. If you are running on a device or desktop build, these flags will reflect actual OS.
Syntax | Summary |
---|---|
targetiOS | true for iOS targets and devices. |
targetAndroid | true for Android targets and devices. |
targetAppleTV | true for Apple TV OS targets and devices. |
targetOSX | true for OS X and devices. |
targetWin | true for Windows and devices. |
targetDesktop | true any desktop target or device. |
targetDevice | true any mobile target or device. |
Actual Device Flags
These flags tell you the device you are running or the skin of the simulator.
oniPhone | |||
oniPhone4 | oniPhone5 | oniPhone5c | oniPhone5s |
oniPhone6 | oniPhone6Plus | oniPhone6s | oniPhone6sPlus |
oniPad | oniPadPro | ||
onAndroidTablet | Not 100% reliable. | ||
onTablet |
Copyright © Roaming Gamer, LLC. 2008-2016; All Rights Reserved