[英]Check if Phonegap app is running on iPad or iPhone
I would like to check inside my javascript file if I am running on an iPad or an iPhone. 我想检查我的JavaScript文件是否在iPad或iPhone上运行。 My app was using previously the device.platform method of Phonegap 1.9 which was retrieving "iPhone" or "iPad".
我的应用程序以前使用的是Phonegap 1.9的device.platform方法,该方法正在检索“ iPhone”或“ iPad”。 I am now upgrading the app to Phonegap 3.0 and this same method retrieves "iOS".
我现在将应用程序升级到Phonegap 3.0,并且该方法检索“ iOS”。
Is there a clean method to retrieve the platform? 有没有一种干净的方法来检索平台?
你可以使用device.name方法吗
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.