Reputation: 43855
Is there an easy way to detect if my app is running on an iPhone5?
Upvotes: 0
Views: 1334
Reputation: 105
You probably want to use the build in device.model part of PhoneGap
http://docs.phonegap.com/en/2.3.0/cordova_device_device.model.md.html#device.model
Upvotes: 2
Reputation: 43855
Why yes, there is...
function isIphone5() {
return device.name.match(/iPhone/i) != null &&
window.innerWidth == 568 || window.innerHeight == 568;
}
Upvotes: 1