Skip to content

Commit

Permalink
Updating readme (#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
wooj2 authored Dec 2, 2021
1 parent 5d22f46 commit 9426a4e
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ See the local.properties definition above to specify this in a config file.
##### Testing Locally
Testing generated services requires `ClientRuntime` of `smithy-swift` and `AWSClientRuntime` Swift packages.

## Alpha SDK Testing Instructions
## SDK Usage Instructions
*Steps*

1. We have all of the AWS SDKs available in our alpha release listed under `/release` in a tagged branch.
AWS SDKs are available under `/release` in a tagged branch.

We will walk you through how you can use `CognitoIdentity` as dependency for example in the steps below. To use it, we will create a test project called TestSdk.

Expand All @@ -71,7 +71,7 @@ Once Xcode is open, open Package.swift. Update the file to mirror the following
* the first target “TestSDK” has a dependency listed as `AWSCognitoIdentity`

```swift
// swift-tools-version:5.4
// swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand All @@ -80,7 +80,7 @@ let package = Package(
name: "TestSdk",
platforms: [.macOS(.v10_15), .iOS(.v13)],
dependencies: [
.package(name: "AWSSwiftSDK", url: "https://github.com/awslabs/aws-sdk-swift", from: "0.0.14"), // <- enter latest version here
.package(name: "AWSSwiftSDK", url: "https://github.com/awslabs/aws-sdk-swift", from: "0.1.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand All @@ -97,24 +97,6 @@ let package = Package(

Then you can open up main.swift, and instantiate CognitoIdentity as follows:

If you are running Swift <5.5:
```swift
import AWSCognitoIdentity

let cognitoIdentityClient = try CognitoIdentityClient(region: "us-east-1")
let cognitoInputCall = CreateIdentityPoolInput(developerProviderName: "com.amazonaws.mytestapplication",
identityPoolName: "identityPoolMadeWithSwiftSDK")

cognitoIdentityClient.createIdentityPool(input: cognitoInputCall) { (result) in
switch(result) {
case .success(let output):
print("\(output)")
case .failure(let error):
print("\(error)")
}
}
```
If you are running 5.5+:
```swift
import AWSCognitoIdentity

Expand Down

0 comments on commit 9426a4e

Please sign in to comment.