I have an iPhone app that is a simple wrapper for a website. It worked fine pre-iOS5, but has problems with anything after that. It loads the website just fine, which begins with a simple login page. Once logged in, the user can navigate the pages okay. The problem, though, is that when the user attempts to send a message through the site (simple web form), it sends them back to the login page. When accessing the site through a desktop browser, or even through Safari on the iPhone, it works great and does not have this issue.
Here is the code:
[webView loadRequest:[NSURLRequest
requestWithURL:[NSURL URLWithString: @"https://xxxxxx"]]];
webView.scalesPageToFit = YES;
webView.opaque = NO;
webView.backgroundColor = [UIColor clearColor];
for (int x = 0 ; x < 10 ; ++x ){
[[[[[webView subviews] objectAtIndex:0] subviews] objectAtIndex:x]setHidden:YES];
}
Like I said, it's dead simple. It just doesn't behave the same as the Safari mobile browser. I suspect that it may have something to do with cookies, so I tried setting NSHTTPCookieAcceptPolicyAlways, but that didn't have any effect.
Any ideas?
Thanks!