Skip to content

Commit

Permalink
Added support for SwiftPM
Browse files Browse the repository at this point in the history
  • Loading branch information
pfandrade committed Oct 14, 2020
1 parent 4e16fa7 commit 9756c37
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 8 deletions.
25 changes: 25 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Sodium",
platforms: [
.macOS(.v10_10), .iOS(.v9)
],
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "Sodium",
targets: ["Sodium"]
)
],
targets: [
.binaryTarget(
name: "Sodium",
url: "https://github.com/OuterCorner/Sodium/releases/download/1.0.18+201014.0/Sodium.xcframework.zip",
checksum: "ee4dadc153329ab5b3f11aa73a64ed677be1026017819f7b3b198fc4d5c35986"
)
]
)
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,20 @@ You have a few different options:
* Include the Sodium.xcodeproj as a dependency in your project. This is what the projects under ```Examples/``` are doing. Doing this means Sodium.framework will be compiled alongside your project, including after every clean.
* Use a pre-built Sodium.framework. You can find them under [Releases](https://github.com/OuterCorner/Sodium/releases).

### Carthage
### SwiftPM

Add Sodium as a dependency on your ```Cartfile```:

```
github "OuterCorner/Sodium"
In your `Package.swift`, add `Sodium` as a dependency:
```swift
dependencies: [
.package(url: "https://github.com/OuterCorner/Sodium", from: "1.0.17")
],
```
And run:

```
carthage update
Associate the dependency with your target:
```swift
targets: [
.target(name: "App", dependencies: ["Sodium"])
]
```

## Usage
Expand Down

0 comments on commit 9756c37

Please sign in to comment.