How to use AWS SDK for iOS?

I am developing one application. That I want to use amazon web services. I downloaded the AWS SDK for iOS. But I do not know how to write code to access AWS. In this I want to use AWS S3.SO, please tell me how to do this.

+7
source share
4 answers

This article can help you get started: http://aws.amazon.com/articles/3002109349624271

+2
source

Here is an example of a simple example showing how to upload / download files from Amazon S3 from your iOS application using Access and Secret Key credentials, i.e. DO NOT use Cognito, which is available only in two regions at the moment: http: // bit. ly / awss3v2ios

+2
source

Here is how I did it.

  • Download aws-ios-sdk or include it in your project using cocoapods. (Using cocoapods is really helpful).

  • Add the -Objc flag to the other linker flags of your build target.

  • Ensure that Foundation.framework and libz.dylib files are added in the build phases.

  • In the AWS Console, create your application and go to Cognito settings.

  • Create a new identity pool.

  • In step 2 of this process, he will ask you to provide the IAM role. I tried to use an existing role, but was not successful, so create a new IAM role and click the upgrade button.

  • This will provide you with a startup code, use it in your iOS code.

  • If you want to have full access to S3 (upload, download, change access settings, delete), go to the IAM section from the AWS console and add the S3 role policy role to the role.

  • AWS-Console setup is now complete, and you can continue to access S3 from your iOS code. You can find the necessary code in the sample application.

+1
source

I was also amazed at this and shared my findings with you. You can easily integrate AWS iOS sdk into your application. You must create a cognito identifier to use this. In addition, for testing, you can test it directly using your credentials. However, the use of credentials in the application is not allowed. You can download the sample application, as well as get a detailed description from here. Click here .

+1
source

All Articles