文章目录
AWS SDK for iOS
[外链图片转存失败(img-wjImlrgY-1567592960653)(https://img.shields.io/github/release/aws/aws-sdk-ios.svg)]
[外链图片转存失败(img-PnVp81o9-1567592960654)(https://img.shields.io/cocoapods/v/AWSiOSSDKv2.svg)]
[外链图片转存失败(img-MBoCtfd5-1567592960654)(https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)]
[外链图片转存失败(img-VazorKaZ-1567592960655)(https://circleci.com/gh/aws-amplify/aws-sdk-ios.svg?style=svg)]
The AWS SDK for iOS provides a library and documentation for developers to build connected mobile applications using AWS.
Features / APIs
- Authentication: APIs and building blocks for developers who want to create user authentication experiences.
- Analytics: Easily collect analytics data for your app. Analytics data includes user sessions and other custom events that you want to track in your app.
- API: Provides a simple solution when making HTTP requests. It provides an automatic, lightweight signing process which complies with AWS Signature Version 4.
- Storage: Provides a simple mechanism for managing user content for your app in public, protected or private storage buckets.
- Push Notifications: Allows you to integrate push notifications in your app with Amazon Pinpoint targeting and campaign management support.
- PubSub: Provides connectivity with cloud-based message-oriented middleware.
- Generated AWS Service Interfaces: Provides direct interaction with any AWS service.
Visit our Web Site to learn more about Amplify Framework.
Setup
To get started with the AWS SDK for iOS, check out the Developer Guide for iOS. You can set up the SDK and start building a new project, or you integrate the SDK in an existing project. You can also run the samples to get a sense of how the SDK works.
To use the AWS SDK for iOS, you will need the following installed on your development machine:
- Xcode 9.2 or later
- iOS 8 or later
Include the SDK for iOS in an Existing Application
The samples included with the SDK for iOS are standalone projects that are already set up for you. You can also integrate the SDK for iOS with your own existing project. There are three ways to import the AWS Mobile SDK for iOS into your project:
You should use one of these three ways to import the AWS Mobile SDK but not multiple. Importing the SDK in multiple ways loads duplicate copies of the SDK into the project and causes compiler errors.
CocoaPods
-
The AWS Mobile SDK for iOS is available through CocoaPods. If you have not installed CocoaPods, install CocoaPods by running the command:
$ gem install cocoapods $ pod setup
Depending on your system settings, you may have to use
sudo
for installingcocoapods
as follows:$ sudo gem install cocoapods $ pod setup
-
In your project directory (the directory where your
*.xcodeproj
file is), create a plain text file namedPodfile
(without any file extension) and add the lines below. ReplaceYourTarget
with your actual target name.source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' use_frameworks! target :'YourTarget' do pod 'AWSAutoScaling' pod 'AWSCloudWatch' pod 'AWSCognito' pod 'AWSCognitoIdentityProvider' pod 'AWSDynamoDB' pod 'AWSEC2' pod 'AWSElasticLoadBalancing' pod 'AWSIoT' pod 'AWSKinesis' pod 'AWSLambda' pod 'AWSMachineLearning' pod 'AWSMobileAnalytics' pod 'AWSS3' pod 'AWSSES' pod 'AWSSimpleDB' pod 'AWSSNS' pod 'AWSSQS' end
[外链图片转存失败(img-mRR0Kkvg-1567592960655)(readme-images/cocoapods-setup-01.png?raw=true)]
-
Then run the following command:
$ pod install
-
Open up
*.xcworkspace
with Xcode and start using the SDK.[外链图片转存失败(img-1et53E41-1567592960656)(readme-images/cocoapods-setup-02.p