-
Notifications
You must be signed in to change notification settings - Fork 17
device.platform
Kerri Shotts edited this page Apr 5, 2014
·
2 revisions
(part of device)
Parameters:
- None
Returns: Platform
Returns the device platform. If the Cordova device
plugin is available, that is used, but otherwise navigator.platform
and navigator.userAgent
are used to determine the device's platform.
Without the device
plugin, the following platforms are detected: ios
, android
, mac
, windows
, linux
.
If the platform cannot be determined, unknown
is returned.
Note: if platformOverride is any value other than false
, that value is returned instead.
if (_y.device.platform() === "ios") {
// do iOS-specific code
} else
{ // other code
}