I am coming across a warning in my app as I’m trying to implement an rss feed.
The warning: Method '-parseRss:entries.' not found (return type defaults to 'id').
and
Method '-parseAtom:entries.' not found (return type defaults to 'id'). are occuring below, on the self... line
- (void)parseFeed:(GDataXMLElement *)rootElement entries:(NSMutableArray *)entries {
if ([rootElement.name compare:@"rss"] == NSOrderedSame) {
[self parseRss:rootElement entries:entries];
} else if ([rootElement.name compare:@"feed"] == NSOrderedSame) {
[self parseAtom:rootElement entries:entries];
} else {
NSLog(@"Unsupported root element: %@", rootElement.name);
}
}
I tried putting: - (void)parseRss:(GDataXMLElement *)rootElement entries:(NSMutableArray *)entries and – (void)parseAtom:(GDataXMLElement *)rootElement entries:(NSMutableArray *)entries in the .h file but it came up with errors.
How can I take out the 2 warnings?
Thanks.
Couple of suggestions
methods in the .h file are exactly as typed in the .m file
parseRSSandparseAtombefore your implementation ofparseFeedIf I’m not mistaken, you’re following the tutorial here for making an RSS reader. You’ll notice, if you download the full source code at the bottom that Ray doesn’t add the method headers in the .h file. He implements the
parseRSSandparseAtomfunctions before theparseFeedfunction.