开发者

iOS SDK NSXMLParserDelegate Warning

开发者 https://www.devze.com 2023-01-26 17:16 出处:网络
I have an application running SDK 3.2, I am using NSXMLParserDelegate for parsing XML. I upgraded it to SDK 4.2 and my application keeps crashing when using the NSXMLParserDelegate, a warning said:

I have an application running SDK 3.2, I am using NSXMLParserDelegate for parsing XML.

I upgraded it to SDK 4.2 and my application keeps crashing when using the NSXMLParserDelegate, a warning said:

'Class' does not implement the 'NSXMLParserDelegate' protocol

I have tried the following:

But all my attempt had failed, please any help is so much appreciated.


Import the Foundation/NSXMLParser.h in header file and just put this line before your interface declaration:

@protocol NSXMLParserDelegate;
// ... and this code you already have but just to be sure it is written as:
@interface SomeYourClass <NSXMLParserDelegate> {

This is a forward declaration of protocol that is actually missing in newer version of NSXML parser.


You can ignore that warning and you even should otherwise it wont run on older OSes.

About the crashing: Since the update to 4.2 i have the same problem when xmlparsing. The problem is that after the update the memory is getting filled and filled until the app crashes. The app had been working for months with no problem even with a hughe amount of data, those days are over. Unfortunately I dont know how to solve it properly. Have tried to find something in here but people keep insisting thats a bug in my code and that there is no change in the memory management...me i dont think so. Maybe there is really no change in memory management but then its another bug of iOS 4.2. I have limited my records now to 50 and it works a bit better...but thats not really a solution.

Hints are mostly welcome :-)

0

精彩评论

暂无评论...
验证码 换一张
取 消