DynamoDBSample
と呼ばれるライブラリとフレームワークのバンドルで最近リリースされた を使用して、Amazon の DynamoDB の探索を拡張しています。awsiossdk v2
ここで問題になるのは、Web で dynamoDB コンソールにアクセスするかどうかrange key
はオプションです。だから私は 1 つのテーブルを作成しましrange key
たhash
が、すべてが適切に見えてもrang key
、アプリのクラッシュを探します。
私が疑っていることの1つは、次のことです。
AWSDynamoDBObjectMapper *dynamoDBObjectMapper = [AWSDynamoDBObjectMapper defaultDynamoDBObjectMapper];
私はdefaultDynamoDBObjectMapper
おそらくハッシュと範囲を意味するものを使用しています。dynamoDBObjectMapper
しかし、ハンドルが範囲キーなしで db を書き込む他のプロパティを見つけることができませんでした。
感謝します!
追加情報。
そして、これが私がそれに2つの書き込みをしようとしている方法です:
AWSDynamoDBObjectMapper *dynamoDBObjectMapper = [AWSDynamoDBObjectMapper defaultDynamoDBObjectMapper];
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
dispatch_async(dispatch_get_main_queue(), ^{
NSMutableArray *tasks = [NSMutableArray array];
NSString *lat = [info objectForKey:@"lat"];
NSString *lon = [info objectForKey:@"lon"];
NSMutableArray *geoLocationMutable = [[NSMutableArray alloc]init];
[geoLocationMutable addObject:lat];
[geoLocationMutable addObject:lon];
NSNCurrentStatusTable *currentStatusTableRow = [NSNCurrentStatusTable new];
currentStatusTableRow.uuid = [[UIDevice currentDevice].identifierForVendor UUIDString];
currentStatusTableRow.lastOnlineTime = [[info objectForKey:@"fullTimeNow"] substringFromIndex:2];
currentStatusTableRow.geoLocation = geoLocationMutable;
currentStatusTableRow.latitude = [info objectForKey:@"latNum"];
currentStatusTableRow.longitude = [info objectForKey:@"lonNum"];
[tasks addObject:[dynamoDBObjectMapper save:currentStatusTableRow]];
[[BFTask taskForCompletionOfAllTasks:tasks]
continueWithExecutor:[BFExecutor mainThreadExecutor] withBlock:^id(BFTask *task) {
if (task.error) {
NSLog(@"Error: [%@]", task.error);
[self getNextStep:YES];
}
else
{
[self getNextStep:YES];
}
return nil;
}];
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
});
});