问题描述
我一直在四处寻找,没有发现近期的一个问题,我在中上载和从iPhone应用程序下载图像的答案。
I've been looking around and found no recent answer for a problem I'm having in uploading and downloading images from an iPhone application.
我使用AWS SDK V2从我已阅读并从样品S3转移codeS看到,我需要使用AWSCognitoCredentialsProvider率先启动。
I'm using AWS SDK v2 and from what I have read and seen from sample S3 transfer codes, I need to start first using AWSCognitoCredentialsProvider.
AWSCognitoCredentialsProvider *credentialsProvider = [AWSCognitoCredentialsProvider
credentialsWithRegionType:AWSRegionAPNortheast1
accountId:AWSAccountID
identityPoolId:CognitoPoolID
unauthRoleArn:CognitoRoleUnauth
authRoleArn:nil];
但我的唯一信息是:快捷键,秘密,斗名称和目标目录
But the only information I have are: Access Key, Secret, Bucket name, and target directory
相关链接我读的是How我下载从S3文件到一个iPhone应用程序?
但是code甚至不能与AWS SDK框架编译,和相关的框架安装在该项目。
But the code cannot compile even with the AWS SDK framework, and related frameworks are installed in the project.
如何才能做到这一点只使用AWS SDK V2?
How can this be done using only the AWS SDK v2?
感谢你。
推荐答案
我建议你遵循README和运行的。在亚马逊Cognito控制台,你可以得到你需要实例化的凭据提供的信息。
I recommend you follow the README and run the S3TransferManager sample app. In the Amazon Cognito console, you can get the information you need to instantiate the credentials provider.
此外,目前亚马逊Cognito身份可用在 AWSRegionUSEast1
只。
这篇关于连接到S3使用AWS SDK V2(IOS)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!