Open chrisjannenga opened 5 years ago
I briefly had a look at this. It seems like it will be very difficult to reliably check for iOS13+ on an iPad.
(navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)
This code above seems reasonable but is not reliable as it will break if there ever is a Mac version with touch support / or if someone potentially uses a touch monitor. I'm not sure if the Platform
service should handle iOS13 right now (if it is not reliable). The intention seems to be that Safari on iPad iOS13+ behaves like a desktop Safari browser anyway.
I see that it is confusing that Platform#IOS
is false though. That is misleading for sure. I'd be fine going with that check as it will currently work for most cases.. but I also think we should discuss this.
(navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)
works client side. It would be nice to add platform.IPADOS
in CDK in order to be able to check with Universal.
Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.
Find more details about Angular's feature request process in our documentation.
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.
We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.
You can find more details about the feature request process in our documentation.
I believe this should be an essential feature of the platform package
Reproduction
Use StackBlitz to reproduce your issue: https://stackblitz.com/edit/platform-checker
Steps to reproduce:
Expected Behavior
What behavior were you expecting to see?
I am expecting to be able to tell if the iPad is running the new iPad OS or if it is still running iOS.
Actual Behavior
What behavior did you actually see?
Currently there isn't a check - An iPad running the new iPad OS set's the iOS flag to false. There is no way to verify if it is running the new iPad OS
Environment