Skip to content

PKDEVICE.platformOverride

kerrishotts edited this page Nov 12, 2012 · 5 revisions

(part of PKDEVICE)

Type: boolean/string

Default: false

Determines if the platform returned by PKDEVICE.platform should be overridden. If this value is false, the value returned will be the actual platform. If this value is anything other than false, that value will be returned.

For example:

PKDEVICE.platform();
// returns "ios"
PKDEVICE.platformOverride = "android";
PKDEVICE.platform();
// returns "android"

There is generally never any good reason to override the platform in production code. The only use would be when testing code in a browser that doesn't support the device object.

Version

0.1 Introduced

0.2 Docs Valid

Clone this wiki locally