Home > other >  The aws SDK for ios from v1 to v2
The aws SDK for ios from v1 to v2

Time:09-30

Amazon cloud services, recently stopped the V1 version support,
I have a made of v1 and the aws interface program, v1 and v2 version now feel pretty big implementation differences,
Want to consult to see here have this aspect of the great god, and can provide some help,

Now in version v1 v2 in the process of migration, the following main met some problems, because of the official documents are in English, understand there is a little difficult, plus the v2 version current example is less, so it is a bit of a headache:


First is authorized, before is to use the
The original s3=[[AmazonS3Client alloc] initWithAccessKey: ACCESS_KEY_ID withSecretKey: SECRET_KEY];
Login method changed, don't feel will use new method,

How to use the following fields:

Create a default service configuration by adding the following code snippet in the application: didFinishLaunchingWithOptions: application delegate method. :

AWSCognitoCredentialsProvider * credentialsProvider=[AWSCognitoCredentialsProvider
CredentialsWithRegionType: AWSRegionUSEast1
AccountId: AWSAccountID
IdentityPoolId: CognitoPoolID
UnauthRoleArn: CognitoRoleUnauth
AuthRoleArn: nil];

AWSServiceConfiguration * configuration=[AWSServiceConfiguration
ConfigurationWithRegion: AWSRegionUSEast1
CredentialsProvider: credentialsProvider];

[AWSServiceManager defaultServiceManager] defaultServiceConfiguration=configuration;

Another is the tutorial:
Make a call to the AWS services is?

Then there is the following several methods in the v2 version of how to implement?
Is mainly to upload, download, and is by looking at the overall size, make a progress bar,
S3GetObjectRequest
S3GetObjectResponse
S3PutObjectRequest
AmazonClientException
S3ObjectSummary



Thank you thank you very much
  •  Tags:  
  • AWS
  • Related