ons.platform

Utility methods to detect current platform.

Methods Summary #

Signature Description
isWebView() Returns whether app is running in Cordova.
isIOS() Returns whether the OS is iOS.
isAndroid() Returns whether the OS is Android.
isIPhone() Returns whether the device is iPhone.
isIPad() Returns whether the device is iPad.
isBlackBerry() Returns whether the device is BlackBerry.
isOpera() Returns whether the browser is Opera.
isFirefox() Returns whether the browser is Firefox.
isSafari() Returns whether the browser is Safari.
isChrome() Returns whether the browser is Chrome.
isIE() Returns whether the browser is Internet Explorer.
isIOS7above() Returns whether the iOS version is 7 or above.

Methods

isWebView(): Boolean #

Returns whether app is running in Cordova.

isIOS(): Boolean #

Returns whether the OS is iOS.

isAndroid(): Boolean #

Returns whether the OS is Android.

isIPhone(): Boolean #

Returns whether the device is iPhone.

isIPad(): Boolean #

Returns whether the device is iPad.

isBlackBerry(): Boolean #

Returns whether the device is BlackBerry.

isOpera(): Boolean #

Returns whether the browser is Opera.

isFirefox(): Boolean #

Returns whether the browser is Firefox.

isSafari(): Boolean #

Returns whether the browser is Safari.

isChrome(): Boolean #

Returns whether the browser is Chrome.

isIE(): Boolean #

Returns whether the browser is Internet Explorer.

isIOS7above(): Boolean #

Returns whether the iOS version is 7 or above.

Discussion #