fix(platform): detect iPad Pro correctly (#10292)

* fix(platform): iPad pro is detected as an iPad

* chore(platform): ipad should be last
This commit is contained in:
Justin Willis
2017-02-02 15:19:34 -06:00
committed by Brandy Carney
parent 7f304edcf9
commit f12fc61211
2 changed files with 41 additions and 0 deletions

View File

@ -986,6 +986,16 @@ export class Platform {
while (platformNode) {
platformNode.initialize(this);
// extra check for ipad pro issue
// https://forums.developer.apple.com/thread/25948
if (platformNode.name === 'iphone' && this.navigatorPlatform() === 'iPad') {
// this is an ipad pro so push ipad and tablet to platforms
// and then return as we are done
this._platforms.push('tablet');
this._platforms.push('ipad');
return;
}
// set the array of active platforms with
// the last one in the array the most important
this._platforms.push(platformNode.name);