Skip to content

Commit 8012f01

Browse files
author
Yosuke Matsuda
committed
Updated README.md to use AWSCognitoCredentialsProvider as a default credentials provider.
1 parent 5b28919 commit 8012f01

File tree

2 files changed

+8
-47
lines changed

2 files changed

+8
-47
lines changed

README.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,14 @@ It is easy to use the AWS SDK for iOS with Swift. Please see five simple steps b
7878

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

81-
AWSStaticCredentialsProvider *credentialsProvider = [AWSStaticCredentialsProvider credentialsWithAccessKey:@"YourAccessKey" secretKey:@"YourSecretKey"];
82-
AWSServiceConfiguration *configuration = [AWSServiceConfiguration configurationWithRegion:AWSRegionUSEast1 credentialsProvider:credentialsProvider];
83-
[AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration;
81+
AWSCognitoCredentialsProvider *credentialsProvider = [AWSCognitoCredentialsProvider credentialsWithRegionType:AWSRegionUSEast1
82+
accountId:AWSAccountID
83+
identityPoolId:CognitoPoolID
84+
unauthRoleArn:CognitoRoleUnauth
85+
authRoleArn:nil];
86+
AWSServiceConfiguration *configuration = [AWSServiceConfiguration configurationWithRegion:AWSRegionUSEast1
87+
credentialsProvider:credentialsProvider];
88+
[AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration;
8489

8590
1. Import service headers where you want to use the services.
8691

how_to_use_cocoapods_locally.md

-44
This file was deleted.

0 commit comments

Comments
 (0)