ios - AWSDynamoDB - empty task result -
task = [[task continuewithsuccessblock:^id(bftask *task) { nslog(@"%@: profile identity : %@", nsstringfromselector(_cmd), cognitouid); awsdynamodbobjectmapper *dynamodbobjectmapper = [awsdynamodbobjectmapper defaultdynamodbobjectmapper]; return [dynamodbobjectmapper load:[tplcognitouserdbo class] hashkey:cognitouid rangekey:nil]; }]continuewithblock:^id(bftask *task) { if (task.error) { nslog(@"%@: request failed. error: [%@]",nsstringfromselector(_cmd), task.error); } if (task.exception) { nslog(@"%@: request failed. exception: [%@]", nsstringfromselector(_cmd), task.exception); } if (task.result) { tplcognitouserdbo *cognitoprofile = task.result; if(cognitoprofile) { nslog(@"%@: user id %@ ::",nsstringfromselector(_cmd), [cognitoprofile tplhandle]); [useridfound setstring: [cognitoprofile tplhandle]]; } else { nslog(@"%@: output has no records in it.", nsstringfromselector(_cmd)); } } return nil; }]; return task;
gives me error
2015-08-24 22:41:21.539 myplan[9904:815677] -[awstask tplhandle]: unrecognized selector sent instance
2015-08-24 22:41:21.905 myplan[9904:815766] awsiossdkv2 [debug] awssignature.m line:320 | -[awssignaturev4signer signrequestv4:] | payload {"key":{"tplcognitoid":{"s":"some value here"}},"tablename":"tplcognitouser"}
2015-08-24 22:41:22.341 myplan[9904:815766] awsiossdkv2 [verbose] awsurlresponseserialization.m line:79 | -[awsjsonresponseserializer responseobjectforresponse:originalrequest:currentrequest:data:error:] | response body: [{}]
** db definition
@interface tplcognitouserdbo : awsdynamodbobjectmodel <awsdynamodbmodeling> //keys @property (nonatomic, strong) nsstring *tplcognitoid; //other attributes @property (nonatomic, strong) nsstring *tplhandle;
the test result shown type, code continuewithblock:^id(bftask *task). task type not matched in code. – yi zhu
Comments
Post a Comment