Cannon
Cannon

Reputation: 2783

class 'Parser' does not implement the 'NSXMLParserDelegate' protocol

I just downloaded the code from http://cocoadevblog.com/iphone-tutorial-creating-a-rss-feed-reader to see how to implement rss feeder And it shows a warning " class 'Parser' does not implement the 'NSXMLParserDelegate' protocol " at [rssParser setDelegate:self]; in parer.m. App loads in simulator but does not work. I checked in refernces foundation is included. Any idea ?

Upvotes: 2

Views: 2460

Answers (1)

Elfred
Elfred

Reputation: 3851

If you are building for iOS 4, make sure your interface looks like this:

 @protocol NSXMLParserDelegate; //makes sure it builds in previous versions of iOS.
 @interface Parser<NSXMLParserDelegate> {
 ...
 }
 ...
 @end

That said, this is just a warning. If your code is correct, it should work.

Upvotes: 7

Related Questions