iPad Pro has wrong userAgent inside UIWebView
| Originator: | christian.hemker | ||
| Number: | rdar://23927659 | Date Originated: | 2015/12/16 |
| Status: | Duplicate of 23555731 (Open) | Resolved: | |
| Product: | iOS | Product Version: | iOS 9.2.1 Beta (13D11) |
| Classification: | Reproducible: | Yes |
Summary: I use a UIWebView and within the HTML file I check the userAgent to show the right CSS Layout for the site. The value for navigator.userAgent says IPhone on device with 9.2.1 beta If you start the iPad Pro Simulator with 9.2 everything is fine, because the userAgent says its an iPad. Steps to Reproduce: 1. Build an App with UIWebView 2. Call an HTML File that prints out the navigator.userAgent in console. 3. Run that app on an iPad Pro with 9.2.1 beta Expected Results: The userAgent string shows something like "mozilla/5.0 (ipad; cpu os 9_2 like mac os x) applewebkit/601.1.46 (khtml, like gecko) mobile/13c75" Actual Results: The userAgent has the following value: Mozilla/5.0 (iPhone; CPU iPhone OS 9_2_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13D11 Version: iOS 9.2.1 Beta (13D11) Configuration: iPad Pro 128 GB
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Problem exists only if no Launch Screen File is used
Previous the there was the same bug with an App build with iOS SDK 8.4 and the userAgent inside UIWebView or WKWebView says i am an iPhone. Then we rebuild our App with iOS 9.1 to get the iPad userAgent inside our App. But we could not go for Multitasking because of the bug with the select box that appears inside Slide Over or 1/3 Width. radar 23810163
For this case we did not use an Launch Screen File (StoryBoard). Now without an Launch Screen File the userAgent Bug reappears with 9.2.1 beta 1.