Skip to content

Commit

Permalink
chore: update readme instructions for including Momento in Package.sw…
Browse files Browse the repository at this point in the history
…ift file (#97)

* chore: update readme instructions for including Momento in Package.swift file

* use swift tools version 5.7
  • Loading branch information
anitarua authored Dec 11, 2023
1 parent ca66689 commit b541f8b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 5.4
// swift-tools-version: 5.7
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand Down
44 changes: 32 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,38 @@ To get started with Momento you will need a Momento API key. You can get one fro

## Packages

The Momento Swift SDK is available here on github: [momentohq/client-sdk-swift](https://github.com/momentohq/client-sdk-swift). Add the following to the `dependencies` section of your `Package.swift` file to include the SDK in your project:

```bash
.package(url: "https://github.com/momentohq/client-sdk-swift", exact: "0.2.1")
```

Your target dependencies will refer to the Momento SDK like so:

```bash
dependencies: [
.product(name: "momento", package: "client-sdk-swift"),
],
The Momento Swift SDK is available here on github: [momentohq/client-sdk-swift](https://github.com/momentohq/client-sdk-swift).

Edit your `Package.swift` file to include the SDK in your project:

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

import PackageDescription

let package = Package(
name: "momento-example",
platforms: [.macOS(.v10_15), .iOS(.v13)],
products: [
.executable(
name: "momento-example",
targets: ["momento-example"]
),
],
dependencies: [
.package(url: "https://github.com/momentohq/client-sdk-swift", exact: "0.3.1")
],
targets: [
.executableTarget(
name: "momento-example",
dependencies: [
.product(name: "Momento", package: "client-sdk-swift"),
],
path: "Sources"
),
]
)
```

## Usage
Expand Down

0 comments on commit b541f8b

Please sign in to comment.