我做错了吗?我想它可能是模拟器,但我不确定。我在tabbar应用程序中创建了一个RSS阅读器。当我使用rss feed时,它表示无法在我无法获取Feed的UIAlertView中获取rss。它是饲料类型吗?我不确定。这是代码:
-(BOOL)fetchAndParseRss{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
//To suppress the leak in NSXMLParser
[[NSURLCache sharedURLCache] setMemoryCapacity:0];
[[NSURLCache sharedURLCache] setDiskCapacity:0];
NSURL *url = [NSURL URLWithString:@"feed:https://www.google.com/calendar/feeds/fcfihq@aol.com/public/basic?orderby=starttime"];
BOOL success = NO;
NSXMLParser *parser = [[NSXMLParser alloc] initWithContentsOfURL:url];
[parser setDelegate:self];
[parser setShouldProcessNamespaces:YES];
[parser setShouldReportNamespacePrefixes:YES];
[parser setShouldResolveExternalEntities:NO];
success = [parser parse];
[parser release];
[pool drain];
return success;
}
还有一个警告:“类'BlogRssParser'没有实现'NSXMLParserDelegate'协议”
答案 0 :(得分:1)
尝试删除“Feed:”
NSURL *url = [NSURL URLWithString:@"https://www.google.com/calendar/feeds/fcfihq@aol.com/public/basic?orderby=starttime"];