我正在尝试获取令牌,但收到诸如“WACloudAccessControlClient”之类的警告消息,可能无法响应 setToken
- (BOOL)webView:(UIWebView *)webView
shouldStartLoadWithRequest:(NSURLRequest *)request
navigationType:(UIWebViewNavigationType)navigationType
{
NSURL *url = [[NSURL alloc] initWithString:@"URL"];
if(url)
{
/* make the call re-entrant when we re-load the content ourselves */
if([url isEqual:[request URL]])
{
return YES;
}
[url release];
}
url = [[request URL] retain];
NSString* scheme = [url scheme];
if([scheme isEqualToString:@"acs"])
{
// parse the JSON URL parameter into a dictionary
NSDictionary* pairs = [self parsePairs:[url absoluteString]];
if(pairs)
{
WACloudAccessToken* accessToken;
accessToken = [[WACloudAccessToken alloc] initWithDictionary:pairs];
[WACloudAccessControlClient setToken:accessToken];
[self dismissModalViewControllerAnimated:YES];
}
return NO;
}
[NSURLConnection connectionWithRequest:request delegate:self];
return NO;
}
有任何想法吗?