iphone - Unrecognized selector sent to instance when calling category method -



iphone - Unrecognized selector sent to instance when calling category method -

i have static library made encryption xml serialization utilize in projects. code worked until now. when included in latest project got error, know error appears when object phone call not allocated witch not case here nslog returns nsdata encryption.

what problem?

the error is

-[nsconcretedata base64encodingwithlinelength:]: unrecognized selector sent instance 0x1c9150

* terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[nsconcretedata base64encodingwithlinelength:]: unrecognized selector sent instance 0x1c9150'

here code:

nsdata * encryptedmsg =[crypto encrypt:msgenc key:[accessdata->certificate datausingencoding:nsutf8stringencoding] padding:&padding]; nslog(@"encryptedmsg %@",encryptedmsg); nsstring * msg = [nsstring stringwithformat:@"%@", [encryptedmsg base64encodingwithlinelength:0]];

as far know, base64encodingwithlinelength method not defined in nsdata in category called nsdata+base64.h. reason why error did not add together category project, method called, not found.

so should add together "nsdata+base64.*" files project. them here.

edit:

since op mention category included in static library , assuming static library correctly linked, possible prepare issue adding

-objc

flag "other linker flags" in build settings. flag forcefulness loading of symbols in objective c categories, preventing them beingness optimized out through linker.

iphone objective-c xcode

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -