Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(platform): Ipad pro not detected properly #10209

Closed
dylanvdmerwe opened this issue Jan 27, 2017 · 7 comments
Closed

bug(platform): Ipad pro not detected properly #10209

dylanvdmerwe opened this issue Jan 27, 2017 · 7 comments
Milestone

Comments

@dylanvdmerwe
Copy link
Contributor

Ionic version: (check one with "x")
[ ] 1.x
[x] 2.x

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
I have the following code:

            if (this.platformService.is('android') && this.platformService.is('tablet'))
                return 'androidtablet';
            else if (this.platformService.is('android'))
                return 'android';
            else if (this.platformService.is('ipad'))
                return 'ipad';
            else if (this.platformService.is('ios'))
                return 'iphone';
            else
                return 'web'; // unknown?

When digging through my logs, I found the following which seemed odd:
pasted_image_at_2017_01_24_10_21_pm

This particular app is only able to be run on iPads. The Platform user agent detection logic is not correct for the latest iPads it seems.

Note in the screenshot how all the iPad models 6,7 and 6,8 show up as iPhone whereas they are all running on iPad devices.

Expected behavior:
Check the Platform user agent detection logic on the latest iPad devices.

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

Cordova CLI: 6.5.0
Ionic Framework Version: 2.0.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.0.0
ios-deploy version: 1.9.0
ios-sim version: 5.0.10
OS: macOS Sierra
Node Version: v6.9.1
Xcode version: Xcode 8.2.1 Build version 8C1002
@jgw96 jgw96 added the v2 label Jan 27, 2017
@jgw96 jgw96 self-assigned this Jan 27, 2017
@jgw96 jgw96 added this to the 2.0.1 milestone Jan 27, 2017
@jgw96
Copy link
Contributor

jgw96 commented Jan 27, 2017

So here is my findings so far: On the latest iPad simulator running 10.2 I am not able to repro this issue. I am adding new unit tests to cover this area a little better just to be 100% sure and to prevent this from breaking in the future. If you can, could you post a repo i could use to reproduce this issue?

@jgw96
Copy link
Contributor

jgw96 commented Jan 27, 2017

Removing this from the milestone at the moment since it is not currently reproducible, but @dylanvdmerwe let me know when you are able to do more testing with your device and ill take another look. Thanks!

@jgw96 jgw96 removed this from the 2.0.1 milestone Jan 27, 2017
@dylanvdmerwe
Copy link
Contributor Author

My iPad (model 5,3) user agent is:

Mozilla/5.0 (iPad; CPU OS 10_2_1 like Mac OS X) AppleWebKit/602.4.6 (KHTML, like Gecko) Mobile/14D27 (4302333408)

Note that this seems to be correctly identified as an iPad.

It's for model 6,7 that seems to be having a problem.

@jgw96
Copy link
Contributor

jgw96 commented Jan 31, 2017

Hmm from some searching on the web it looks like the ipad model 6,7 is the iPad pro. Doing a quick test with the ipad pro simulator. Thanks for the UA @dylanvdmerwe

@jgw96 jgw96 changed the title bug(platform): User agent not always detected properly bug(platform): Ipad pro not detected properly Jan 31, 2017
@jgw96
Copy link
Contributor

jgw96 commented Jan 31, 2017

Finally figured out the issue here. I can confirm that this seems to be specific to the iPad pro at the time. It is possible that this also affects other large tablets but im not aware of any other tablets as big as the iPad pro. The biggest Android tablet i know of is the Google Pixel c, but it is only a 10.2 inch screen and the nexus 10, which is a 10 inch screen, works fine.

@jgw96 jgw96 added this to the 2.0.1 milestone Jan 31, 2017
@jgw96 jgw96 mentioned this issue Feb 2, 2017
@brandyscarney
Copy link
Member

This will be fixed in the next release. Released a nightly for this:

npm install --save --save-exact [email protected]

Let me know if you see any issues, @dylanvdmerwe :)

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 4, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot unassigned jgw96 Sep 4, 2018
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants