cordova - PhoneGap How to detect IOS version? -
i wondering in phonegap/cordova there anyway detect ios version? because need distinguish between ios 8 , prior push notification payload limit different 8prior , 8.
thanks
according cordova docs, can use var string = device.version; device version.
example cordova docs:
<!doctype html> <html> <head> <title>device properties example</title> <script type="text/javascript" charset="utf-8" src="cordova.js"></script> <script type="text/javascript" charset="utf-8"> // wait device api libraries load document.addeventlistener("deviceready", ondeviceready, false); // device apis available function ondeviceready() { var element = document.getelementbyid('deviceproperties'); element.innerhtml = 'device model: ' + device.model + '<br />' + 'device cordova: ' + device.cordova + '<br />' + 'device platform: ' + device.platform + '<br />' + 'device uuid: ' + device.uuid + '<br />' + 'device version: ' + device.version + '<br />'; } </script> </head> <body> <p id="deviceproperties">loading device properties...</p> </body> </html>
Comments
Post a Comment