-
Notifications
You must be signed in to change notification settings - Fork 29
PKDEVICE.platform
kerrishotts edited this page Apr 1, 2013
·
2 revisions
(part of PKDEVICE)
Return Type: string
Returns: ios, android, wince, ...
Inspects Phonegap's device.platform
to determine the actual platform. Therefore, any values returned by device.platform
can be returned by this method. The method coalesces "ipad" and "iphone" to "ios" for versions of Phonegap < 2.3. For versions of PhoneGap 2.3 and higher, the device.platform
property already returns "iOS", and so all this method does is lowercase it.
Note: As of 0.3, if the device can not be determined (say, because it's being used by cordova serve
), this function returns "unknown".
Example:
PKDEVICE.platform();
// returns "ios"
The value can be overridden by setting PKDEVICE.platformOverride to a value other than false.
0.1 Introduced
0.3 +unknown, +PG2.3 changes, Docs Valid