未知的接收器&dynamoDBObjectMapper'你的意思是'AWSDynamoDBObjectMapper'?

时间:2016-08-01 09:49:45

标签: ios objective-c amazon-web-services amazon-dynamodb

我正在尝试在目标C中实施AWS DynamoDB扫描。

我收到错误但我不确定是什么导致它:

Unknown receiver 'dynamoDBObjectMapper' did you mean 'AWSDynamoDBObjectMapper'? 

问题行在代码中突出显示:

#import "ScanTable.h"
#import "Mapper.h"

        @implementation ScanTable

        void scanTableDo () {
            AWSDynamoDBScanExpression *scanExpression = [AWSDynamoDBScanExpression new];
            scanExpression.limit = @10;

            [[dynamoDBObjectMapper scan:[Mapper class]
                             expression:scanExpression] /// Problem here
             continueWithBlock:^id(AWSTask *task) {
                 if (task.error) {
                     NSLog(@"The request failed. Error: [%@]", task.error);
                 }
                 if (task.exception) {
                     NSLog(@"The request failed. Exception: [%@]", task.exception);
                 }
                 if (task.result) {
                     AWSDynamoDBPaginatedOutput *paginatedOutput = task.result;
                     for (Mapper *book in paginatedOutput.items) {
                         //Do something with book.
                     }
                 }
                 return nil;
             }];


        }

        @end

感谢您的帮助。

0 个答案:

没有答案