I found the solution to this finally, and I will document it here if
anyone else is hit by this:
in PhoneGapViewController.m, willRotateToInterfaceOrientation
function:
[webView stringByEvaluatingJavaScriptFromString:[NSString
stringWithFormat:@"navigator.orientation.setOrientation(%f);", i]];
Comment out the above call, and the problem is gone. I have no idea
why this is the case, but works for me.
On Jul 4, 11:04 pm, Björn Nilsson <
bni....@gmail.com> wrote:
> I only have this problem if this is present in my -Info.plist:
>
> <key>UISupportedInterfaceOrientations</key>
> <array>
> <string>UIInterfaceOrientationLandscapeRight</string>
> <string>UIInterfaceOrientationLandscapeRight</string>
> <string>UIInterfaceOrientationLandscapeRight</string>
> <string>UIInterfaceOrientationLandscapeRight</string>
> </array>
>
> If I instead have the default:
>
> <key>UISupportedInterfaceOrientations</key>
> <array>
> <string>UIInterfaceOrientationPortrait</string>
> </array>
>
> Everything is OK and the values are read the first launch also.
>
> Very strange stuff going on here, that these settings should affect
> local storage behavior.
>
> (The reason Im setting UISupportedInterfaceOrientations key like this
> is to force landscape only, as per comment to bughttp://
phonegap.lighthouseapp.com/projects/20116-iphone/tickets/57)