lundi 24 août 2015

AWSDynamoDB - empty task result

task = [[task continueWithSuccessBlock:^id(BFTask *task)
{       
      NSLog(@"%@: Get profile for 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(@"%@: The request failed. Error: [%@]",NSStringFromSelector(_cmd), task.error);
            }
            if (task.exception) {
                NSLog(@"%@: The 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 -[AWSTask TPLHandle]: unrecognized selector sent to instance

** DB Definition

@interface TPLCognitoUserDBO : AWSDynamoDBObjectModel

//Keys

@property (nonatomic, strong) NSString *TPLCognitoID;

//Other Attributes

@property (nonatomic, strong) NSString *TPLHandle;




Aucun commentaire:

Enregistrer un commentaire