It seems Google has fixed this bug. Now re-captcha works on iOS6.
reCAPTCHA not working in iOS6 UIWebView
-
13-10-2022 - |
Question
I have problems with loading reCAPTCHA with UIWebView component on iOS6.
The first time page loads fine. See screenshot for http://www.google.com/recaptcha/learnmore.
But subsequent load requests of the same page have captcha image missing.
My controller code is simple:
- (void)viewDidLoad
{
[super viewDidLoad];
[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.com/recaptcha/learnmore"]]];
}
and the second time this controller is loaded I have broken reCAPTCHA image.
Clearing cache with [[NSURLCache sharedURLCache] removeAllCachedResponses];
does not help. Specifying NSURLRequest cache policy like this does not work too:
- (void)viewDidLoad
{
[super viewDidLoad];
[self.webView loadRequest:[NSURLRequest requestWithURL:[self.reCaptchaURL]
cachePolicy:NSURLRequestReloadIgnoringLocalCacheData
timeoutInterval:60]];
}
The problem is specific to iOS 6.0 and iOS 6.1. On iOS 7.0 this code works fine.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow