I'm getting a SIG_ABRT error in the one line within the else of this method in the FMCallback class of the Last FM API.
- (void)fire {
if(_identifier == nil) {
[_target performSelector:_selector withObject:_userInfo];
} else {
[_target performSelector:_selector withObject:_identifier withObject:_userInfo];
}
}
The console output shows this:
2011-05-29 13:52:24.533 QueryTesting[6918:707] +[LastFM loginCallback:data:]: unrecognized selector sent to class 0x19550
2011-05-29 13:52:24.625 QueryTesting[6918:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[LastFM loginCallback:data:]: unrecognized selector sent to class 0x19550'
What does this mean? Am I not sending enough information with my request?
EDIT: Here is the code to create the FMEngine (api key x'd out):
+ (void)logUserInWithUsername:(NSString *) username andPassword:(NSString *) password {
FMEngine *fmEngine;
fmEngine = [[FMEngine alloc] init];
NSString *authToken = [fmEngine generateAuthTokenFromUsername:username password:password];
NSDictionary *urlDict = [NSDictionary dictionaryWithObjectsAndKeys:username, @"username", authToken, authToken, _LASTFM_API_KEY_, @"XXXXXXXXXXXXXXXX", nil, nil];
[fmEngine performMethod:@"auth.getMobileSession" withTarget:self withParameters:urlDict andAction:@selector(loginCallback:data:) useSignature:YES httpMethod:POST_TYPE];
}
- (void)loginCallback:(NSString *)identifier data:(id)data {
// data is either NSData or NSError
NSLog(@"Got Data (%@): %@", identifier, data);
}