简体   繁体   中英

iOS7 compatibility with App on iPad

Our current app doesn't work on the ipad 3 with retina display running ios7 beta 6.

The html page served between the is too big on the ipad, ie. ignores 100% width - therefore the user needs to scrolls around the page to see all the buttons and functionality rather than it fitting on one page.

This doesn't happen on the iphone 4 running ios7 (other models not checked) and it doesn't matter whether or not x2 is selected for the ipad zoom.

Has any one come across this issue, is this a media query fix or a iOs7 bug?

Just updating my answer based on what we've found last week and implemented for our app as a solution.

Although not entirely clear I believe the Question in hand above has to do with an HTML application running in webview vs. a web application in safari. Because 2x compatibility mode is being referenced in the question.

Issue: Is not due to media Query but the viewport width=device-width is returning 768 instead of the 320 it returned in <= iOS6.x, when running an iPhone application in 'Compatibility Mode' on an iPad.

Fixing on the remote page The best solution is to edit the viewport on the remote page by modifying the value of the 'width' attribute or removing it all together.

Fixing natively: Few options... 1) Build the app as 'Universal' 2) I found somewhat passable results by executing javascript on webViewDidFinishLoad to decrease the scale

self.webView stringByEvaluatingJavaScriptFromString:@"$('meta[name=viewport]').attr('content','width=device-width, initial-scale=.41 user-scalable=no');"];

If you happen to be using PhoneGap/Cordova, issue was also identified and filed here: https://issues.apache.org/jira/browse/CB-4323

This should help: http://www.mobilexweb.com/blog/safari-ios7-html5-problems-apis-review

iOS7 has been said to be the buggiest Safari version since 1.0.

There is no way to have a truly fullscreen experience on your website with iOS7. This was one of the wonderful aspects of iOS 6, and losing it is a major step backwards.

I hope that Apple comes to it's senses...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM