iphone - iOS App Exception - Terminating app due to uncaught exception 'NSInvalidArgumentException' -


i getting following exception, terminating app.

terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[__nsarraym objectforkey:]: unrecognized selector sent instance 0x7abe4f90'

following code:

- (nsmutabledata*)dataforconnection:(urlconnection*)connection {        nsmutabledata *data = [receiveddata objectforkey:connection.tagkey]; // exception here return data; } 

could please suggest how fix it? thank in advance!

problem due not allocating receiveddata properly, since have declared instance variable, should make using property declaration this:

@property(nonatomic, strong) nsmutabledictionary *receiveddata; 

this ensure receiveddata not released , reference using self.receiveddata in code. maybe helpful


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -