我正在尝试在目标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
感谢您的帮助。