OpenUI5 v1.32.10 reports iPad Pro as a phone device
The value for sap.ui.Device.system.phone is TRUE for an iPad Pro. sap.ui.Device.system.tablet returns FLASE sap.ui.Device.system.desktop returns FALSE
This makes applications render as if running on a iPhone when in fact, they are running on an iPad Pro. My test iPad Pro is running iOS 9.2.1 (13D15)
Quick shot (maybe too quick): seems to be a known issue with iOS 9.2.1.
Could you please check the user agent string? E.g. open https://openui5.hana.ondemand.com//test-resources/sap/ui/core/Device.html and press the "Show window.navigator values..."?
[Update] The linked report complains about the 9.2.1 build 13D11, not 13D15, but at least it shows that the same problem already occurred elsewhere and that the user agent string was found to be misleading in that case.
cw
That link shows me the proper values for phone and tablet. Phone shows false and tablet shows true.
Here is the user agent string Mozilla/5.0 (iPad; CPU OS 9_2_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13D15 Safari/601.1
Dean Davis
Sent from my iPad
On Jan 20, 2016, at 10:48 AM, Frank Weigel [email protected] wrote:
Quick shot (maybe too quick): seems to be a known issue with iOS 9.2.1.
Could you please check the user agent string? E.g. open https://openui5.hana.ondemand.com//test-resources/sap/ui/core/Device.html and press the "Show window.navigator values..."?
cw
— Reply to this email directly or view it on GitHub.
But, now I've opened that same link from within my app using sap.m.URLHelper.redirect and the resulting page shows the incorrect values of phone=true and tablet=false The user agent string is... Mozilla/5.0 (iPhone; CPU iPhone OS 9_2_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13D15
That's indeed strange. Is there something special about your app? Does it run in headless Safari or did you launch it from the HomeScreen or something like that?
@simlin maybe you have an idea or know this issue already?
It's a complete OpenUI5 app wrapped in Cordova with a couple of standard plugins. (not sure the version right now). It's launched from the home screen just like any iOS app.
This then matches the bug report on openradar that I linked above. It also says that the userAgent string is broken on iPad Pro / iOS9.2.1 when running in a UIWebView (which I assume is what the Cordova container is doing internally).
There are some proposals how to detect whether an HTML page is running in a UIWebView (e.g. http://stackoverflow.com/questions/4460205/detect-ipad-iphone-webview-via-javascript?rq=1), but one would still need some additional feature (detection) to differentiate between UIWebView on a real iPhone and on an iPad Pro.
Or, maybe, you generally use feature detection instead of device (category) detection. Depends on what you want to achieve (responsive layout, special pen support, side-by-side layout, ...)
Hello Dean,
thanks again for reporting this issue. Even though you are already discussing the issue lively here I have also created an internal ticket to better track it: #1670048012
We will get back to you as soon as we found out more. It is very likely that the issue is related to the bug that codeworrior linked above.
Kind Regards,
Michael
Hello Dean, I consulted our contacts for Apple related issues and asked for feedback. Best Regards Jens
I consulted our product management. We won't provide a workaround for this issue and wait for a bugfix from Apple. Best Regards Jens
We got the feedback from Apple that this was an issue with a beta version only and it should be solved already in the stable versions. Best Regards Jens