ios - Why do I get the error "Unrecognized selector sent to instance error" -


i'm learning objective c , have come across issue. have created simple manager class so

#import <foundation/foundation.h>  @interface passmanager : nsobject  - (void)isvalidcredentials:(nsstring *) username           withpassword:(nsstring *) password               wasvalid:(void(^)(bool success))handler;  @end 

the implementation follows

#import "passmanager.h"  @implementation passmanager  - (void)isvalidcredentials:(nsstring *) username           withpassword:(nsstring *) password               wasvalid:(void(^)(bool success))handler {     handler(true);  }  @end 

this builds upon running error:

"2016-01-27 16:40:41.555 messyapp[19395:897750] -[passmanager initwithconfiguration:]: unrecognized selector sent instance 0x7fd12a413d30 2016-01-27 16:40:41.560 messyapp[19395:897750] *** terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[passmanager initwithconfiguration:]: unrecognized selector sent instance 0x7fd12a413d30'".

what doing wrong?

well error says all, somewhere in code calling initwithconfiguration method on passmanager don't have method in passmanager class, throws exception.

either add method , implement in passmanager class, or if want catch happening (and don't want search occurrences of initwithconfiguration.

you go breakpoint navigator pressing cmd+7 , on bottom press + sign , add exception breakpoint, run app , wait fire.

good luck.


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -