K.Honda
K.Honda

Reputation: 3106

Method '-parseRss:entries.' not found (return type defaults to 'id')

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.

Upvotes: 0

Views: 444

Answers (1)

Convolution
Convolution

Reputation: 2351

Couple of suggestions

  • Make absolutely sure that your methods in the .h file are exactly as typed in the .m file
  • Make sure that the return types for your warning methods are correct
  • Try putting your implementation for parseRSS and parseAtom before your implementation of parseFeed

If 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 parseRSS and parseAtom functions before the parseFeed function.

Upvotes: 1

Related Questions