Iphone Google新闻RSS提要返回DIDROR-1002代码

Iphone Google新闻RSS提要返回DIDROR-1002代码,iphone,sdk,error-handling,rss,Iphone,Sdk,Error Handling,Rss,我正在下载谷歌新闻作为RSS提要。如果我在浏览器中查看,一切正常。但是当我尝试使用下面的代码作为可读文件下载时,我得到了一个“-1002”错误。有什么想法吗 - (void)viewDidLoad{ [super viewDidLoad]; path = @"feed://news.google.com/news?pz=1&jfkl=true&cf=all&ned=us&hl=en&q=oslo&cf=all&output=rss";

我正在下载谷歌新闻作为RSS提要。如果我在浏览器中查看,一切正常。但是当我尝试使用下面的代码作为可读文件下载时,我得到了一个“-1002”错误。有什么想法吗

- (void)viewDidLoad{

[super viewDidLoad];


path = @"feed://news.google.com/news?pz=1&jfkl=true&cf=all&ned=us&hl=en&q=oslo&cf=all&output=rss";
urlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString: path]];
urlConnection = [[NSURLConnection alloc] initWithRequest:urlRequest delegate:self];
[urlConnection release];


}

#pragma mark Download RSS

// Start connection and download
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {

NSLog(@"didReceiveResponse");

rssData = [[NSMutableData data] retain];
}

- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)dataDownloaded {

NSLog(@"didReceiveData");

[rssData appendData:dataDownloaded];
}

- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {

NSString * errorString = [NSString stringWithFormat:@"Error code %i", [error code]];
NSLog(@"error: %@", errorString);

}

- (void)connectionDidFinishLoading:(NSURLConnection *)connection {

NSLog(@"connectionDidFinishLoading");

}

将feed://更改为http://即可