No se puede get AWSS3PutObjectRequest en v2 AWS SDK para duplicar S3PutObjectRequest en v1 SDK

Teniendo problemas con el nuevo SDK de Amazon, https://github.com/aws/aws-sdk-ios-v2

Solo estoy tratando de escribir un file en un cubo s3 que ya existe. Aquí está el código por el que no puedo trabajar por alguna razón (aunque registra "éxito").

AWSStaticCnetworkingentialsProvider *cnetworkingentialsProvider = [AWSStaticCnetworkingentialsProvider cnetworkingentialsWithAccessKey:@"KEY" secretKey:@"SECRET_KEY"]; AWSServiceConfiguration *configuration = [AWSServiceConfiguration configurationWithRegion:AWSRegionUSEast1 cnetworkingentialsProvider:cnetworkingentialsProvider]; [AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration; AWSS3 *s3 = [[AWSS3 alloc] initWithConfiguration:configuration]; AWSS3PutObjectRequest *logFile = [AWSS3PutObjectRequest alloc]; logFile.bucket = @"test"; logFile.key = @"file2"; logFile.contentType = @"text/plain"; logFile.body = @"this is a test"; [[s3 putObject:logFile] continueWithBlock:^id(BFTask *task) { NSLog(@"Totally did it"); return nil; }]; 

El SDK anterior (v1.x) funcionó, pero estoy intentando cambiar porque me gusta la funcionalidad del marco de Bolts.

 AmazonS3Client *s3 = [[AmazonS3Client alloc] initWithAccessKey:@"KEY" withSecretKey:@"SECRET_KEY"]; S3PutObjectRequest *logFile = [[S3PutObjectRequest alloc] initWithKey:@"file1" inBucket:@"test"]; logFile.contentType = @"text/plain"; NSString* myStuff = @"this is a test"; NSData* log = [myStuff dataUsingEncoding:NSUTF8StringEncoding]; logFile.data = log; [s3 putObject:logFile]; 

¿Alguien jugando con el nuevo SDK que me diga qué estoy haciendo mal aquí?

ACTUALIZACIÓN : nuevo fragment de código

  AWSStaticCnetworkingentialsProvider *cnetworkingentialsProvider = [AWSStaticCnetworkingentialsProvider cnetworkingentialsWithAccessKey:awsAccessKey secretKey:awsSecretKey]; AWSServiceConfiguration *configuration = [AWSServiceConfiguration configurationWithRegion:AWSRegionUSEast1 cnetworkingentialsProvider:cnetworkingentialsProvider]; [AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration; /* This section works but posts as text/xml AWSS3TransferManager *transferManager = [AWSS3TransferManager defaultS3TransferManager]; AWSS3TransferManagerUploadRequest *getLog = [AWSS3TransferManagerUploadRequest new]; */ AWSS3 *transferManager = [[AWSS3 alloc] initWithConfiguration:configuration]; AWSS3PutObjectRequest *getLog = [AWSS3PutObjectRequest alloc]; getLog.bucket = awsS3Bucket; getLog.key = awsS3FileNameString; getLog.contentType = @"text/plain"; NSString *documentsDirectory = [NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; NSString *fileName = [documentsDirectory stringByAppendingPathComponent:logFileName]; long long fileSize = [[[NSFileManager defaultManager] attributesOfItemAtPath:fileName error:nil][NSFileSize] longLongValue]; getLog.body = [NSURL fileURLWithPath:fileName]; getLog.contentLength = [NSNumber numberWithUnsignedLongLong:fileSize]; /* [[transferManager upload:getLog] continueWithBlock:^id(BFTask *task) { */ [[transferManager putObject:getLog] continueWithBlock:^id(BFTask *task) { if(task.error) { NSLog(@"Error: %@",task.error); } else { NSLog(@"Got here: %@", task.result); } return nil; }]; 

Gracias de nuevo.

La propiedad del body de AWSS3PutObjectRequest debe ser NSURL o NSData . Si convierte NSString a NSData como lo está haciendo en el fragment de código v1, debería funcionar.