webViewDidFinishLoad is:
- (void)webViewDidFinishLoad:(UIWebView *)webView {
[self notifyWithName:kGTMOAuth2WebViewStoppedLoading
webView:webView
kind:kGTMOAuth2WebViewFinished];
NSString *title = [webView stringByEvaluatingJavaScriptFromString:
@"document.title"];
if ([title length] > 0) {
[signIn_ titleChanged:title];
} else {
#if DEBUG
// Verify that Javascript is enabled
NSString *result = [webView stringByEvaluatingJavaScriptFromString:
@"1+1"];
NSAssert([result integerValue] == 2, @"GTMOAuth2: Javascript is
required");
#endif
}
if (self.request && [self.initialHTMLString length] > 0) {
// The request was pending.
[self setInitialHTMLString:nil];
[self.webView loadRequest:self.request];
} else {
[signIn_ cookiesChanged:[NSHTTPCookieStorage sharedHTTPCookieStorage]];
[self updateUI];
}
}
I write " #define DEBUG 1" at the beginning
of GTMOAuth2ViewControllerTouch.m, but it did not works, the same error
occured.
On Thursday, October 18, 2012 10:56:35 AM UTC+8, Greg Robbins wrote:
> Can you confirm that Javascript is enabled for the webview?
> Be sure that DEBUG is defined to 1 in your development builds, to enable
> the assert that checks for Javascript support. (See webViewDidFinishLoad:
> in GTMOAuth2ViewControllerTouch)