I developed an iPhone html5 app without actually compiling it. I tested as a web app (with a bookmark on home screen and son on).
I used this snippet to make it look nice on iphone:
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=0.5, maximum-scale=0.5" />
Everything was peachy but when i finished everything and tried to compile as a real app (using phonegap as a wrapper) i discovered that the above snippet is totally ignored and the app looks zoomed in.
I found a similar issue on github and the fix is:
I fixed it by adding this to the PhoneGapDelegate.m on line 180:
webView.scalesPageToFit = YES;
But there are two issues:
- the web page is not available anymore (i guess they moved out or something)
- i don’t have any freaking
PhoneGapDelegate.min my project! The only somehow related file isAppDelegate.mor smth which doesn’t help at all.
Another fix that i found is this which… it doesn’t work. I get an error on this line:
webView.frame = webViewFrame; // `webView` undeclared (first use in this function)
So… Any idea on how to make this to work?
Thanks!
EDIT
I finally found the answer
The Answer for the lazy add this into your
PhoneGap.plist: