Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

xenep

macrumors newbie
Original poster
Mar 24, 2009
6
0
Hi all,

i am using soap request in my application and using initWithBytes to convert the retrieved NSMutableData to NSString.

Code:
NSString *theXML = [[NSString alloc] initWithBytes: [webData mutableBytes] length:[webData length] encoding:NSUTF8StringEncoding];

while i am running the app on the simulator everything works fine. but at the iPhone above code quits with the error :

'NSInvalidArgumentException', reason: '*** -[NSCFString isNotEqualTo:]: unrecognized selector sent to instance 0x16b7e0'

there is no code that includes 'isNotEqualTo' and the problem does not occure at every request.

Thanks in advance
 
Looks like the problem might be elsewhere if you're not calling that method in your code.

BTW, if you're converting an NSData object to an NSString it's probably better to use initWithData:encoding: since you're using the entire data object.
 
thanx for ur reply but i ve already used 'initWithData:encoding:' and it has the same result :(
 
Is it possible that your webData object hasn't been retained correctly?

it should be correct cause it does not ve any problem at simulator.

Set up a gdbinit file as described in this thread

https://forums.macrumors.com/showthre...hlight=gdbinit

i read the thread but i couldnt figure out how to create a gdbinit file. i created a text edit and changed the extension but it was still a text edit, also looked at xCode File->new file but couldnt find a file type that has a . gdbinit extension.
 
You can also add a symbolic breakpoint which has the same effect as the gdbinit file but only for your current project as opposed to every project (you are better off setting up the gdbinit file if the truth be told but this is a quick way). In Xcode go to Run->Manage Breakpoints->Add Symbolic Breakpoint and type in objc_exception_throw into the textbox. Now when you run your app and it crashes out throwing an exception you will be able to open up the debugger window and look through the stack to find your problem
 
Create a text file with the contents shown in that thread and called ~/gdbinit Once the file exists go to the Terminal and enter this command

mv gdbinit .gdbinit

Or use TextWrangler, which will open hidden files.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.