Skip to content

Commit 3bae018

Browse files
Alex Oakleyposplaw
authored andcommitted
Merge pull request #2 from sublabdev/dev
Added SPM support
2 parents cffc71a + 1afe4b4 commit 3bae018

File tree

20 files changed

+149
-39
lines changed

20 files changed

+149
-39
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/Packages
2+
.swiftpm/config/registries.json
3+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
4+
.netrc
5+
6+
17
.DS_Store
28
# Xcode
39
#

Example/HashingSwift.xcodeproj/project.pbxproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@
329329
"${BUILT_PRODUCTS_DIR}/Blake2/Blake2.framework",
330330
"${BUILT_PRODUCTS_DIR}/CommonSwift/CommonSwift.framework",
331331
"${BUILT_PRODUCTS_DIR}/HashingSwift/HashingSwift.framework",
332-
"${BUILT_PRODUCTS_DIR}/keccak.c/keccak.framework",
332+
"${BUILT_PRODUCTS_DIR}/KeccakC/KeccakC.framework",
333+
"${BUILT_PRODUCTS_DIR}/KeccakSwift/KeccakSwift.framework",
333334
"${BUILT_PRODUCTS_DIR}/xxHash-Swift/xxHash_Swift.framework",
334335
);
335336
name = "[CP] Embed Pods Frameworks";
@@ -339,7 +340,8 @@
339340
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Blake2.framework",
340341
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CommonSwift.framework",
341342
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HashingSwift.framework",
342-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/keccak.framework",
343+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KeccakC.framework",
344+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KeccakSwift.framework",
343345
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/xxHash_Swift.framework",
344346
);
345347
runOnlyForDeploymentPostprocessing = 0;

Example/Podfile.lock

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ PODS:
66
- CommonSwift (1.0.0):
77
- BigInt (~> 5.0.0)
88
- HashingSwift (1.0.0):
9-
- Base58Swift (~> 2.1.10)
10-
- Blake2 (~> 0.1.2)
11-
- CommonSwift
12-
- keccak.c (~> 0.1.3)
13-
- xxHash-Swift (~> 1.1.1)
14-
- keccak.c (0.1.3)
9+
- Base58Swift (= 2.1.10)
10+
- Blake2 (= 0.1.2)
11+
- CommonSwift (= 1.0.0)
12+
- KeccakSwift (= 1.0.0)
13+
- xxHash-Swift (= 1.1.1)
14+
- KeccakC (1.0.0)
15+
- KeccakSwift (1.0.0):
16+
- KeccakC (= 1.0.0)
1517
- xxHash-Swift (1.1.1)
1618

1719
DEPENDENCIES:
@@ -23,7 +25,8 @@ SPEC REPOS:
2325
- Base58Swift
2426
- BigInt
2527
- Blake2
26-
- keccak.c
28+
- KeccakC
29+
- KeccakSwift
2730
- xxHash-Swift
2831

2932
EXTERNAL SOURCES:
@@ -43,10 +46,11 @@ SPEC CHECKSUMS:
4346
BigInt: 74b4d88367b0e819d9f77393549226d36faeb0d8
4447
Blake2: f33072b13349da1b8048a2bf26a3a24d4eac6dcc
4548
CommonSwift: ad350f0e06c040e5cb660cd7154f947851c73fbd
46-
HashingSwift: d97c9d264e558e471b15d4c65773104c587a9b4c
47-
keccak.c: 859583afdaccb4e4fcc0f0096064d101580313f4
49+
HashingSwift: 146b65631c26f10e2b699efdff38cf338affe559
50+
KeccakC: f5c18471a67e3bcabbd3427696bb653ef1e28b88
51+
KeccakSwift: cafb62fc6886d980a85e8ab5106367b794d76074
4852
xxHash-Swift: 13ebcbfc48658a5acf3777751e64b18c0f110d25
4953

5054
PODFILE CHECKSUM: 94e0abb08bcbfe869a91c6f141ccbf5fea8b0d0d
5155

52-
COCOAPODS: 1.11.3
56+
COCOAPODS: 1.12.1

HashingSwift.podspec

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ Pod::Spec.new do |s|
77
s.author = { 'Substrate Laboratory LLC' => 'info@sublab.dev' }
88
s.source = { :git => 'https://github.com/sublabdev/hashing-swift.git', :tag => s.version.to_s }
99
s.ios.deployment_target = '13.0'
10-
s.source_files = 'HashingSwift/Classes/**/*'
11-
s.dependency 'CommonSwift', '~> 1.0.0'
12-
s.dependency 'xxHash-Swift', '~> 1.1.1'
13-
s.dependency 'Base58Swift', '~> 2.1.10'
14-
s.dependency 'Blake2', '~> 0.1.2'
15-
s.dependency 'keccak.c', '~> 0.1.3'
16-
10+
s.osx.deployment_target = '10.15'
11+
s.source_files = 'Sources/HashingSwift/**/*'
12+
s.dependency 'CommonSwift', '1.0.0'
13+
s.dependency 'KeccakSwift', '1.0.0'
14+
s.dependency 'xxHash-Swift', '1.1.1'
15+
s.dependency 'Base58Swift', '2.1.10'
16+
s.dependency 'Blake2', '0.1.2'
1717
end

HashingSwift/Assets/.gitkeep

Whitespace-only changes.

HashingSwift/Classes/.gitkeep

Whitespace-only changes.

Package.resolved

Lines changed: 59 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// swift-tools-version:5.6
2+
3+
import PackageDescription
4+
5+
let package = Package(
6+
name: "HashingSwift",
7+
platforms: [
8+
.iOS(.v13),
9+
.macOS(.v10_15),
10+
.watchOS(.v6),
11+
.tvOS(.v13)
12+
],
13+
products: [
14+
.library(
15+
name: "HashingSwift",
16+
targets: ["HashingSwift"]
17+
),
18+
],
19+
dependencies: [
20+
.package(url: "https://github.com/sublabdev/common-swift.git", exact: "1.0.0"),
21+
.package(url: "https://github.com/sublabdev/keccak-swift.git", exact: "1.0.0"),
22+
.package(url: "https://github.com/daisuke-t-jp/xxHash-Swift", exact: "1.1.1"),
23+
.package(url: "https://github.com/keefertaylor/Base58Swift.git", exact: "2.1.10"),
24+
.package(url: "https://github.com/tesseract-one/Blake2.swift.git", exact: "0.1.2")
25+
],
26+
targets: [
27+
.target(
28+
name: "HashingSwift",
29+
dependencies: [
30+
.productItem(name: "CommonSwift", package: "common-swift"),
31+
.productItem(name: "KeccakSwift", package: "keccak-swift"),
32+
.productItem(name: "xxHash-Swift", package: "xxHash-Swift"),
33+
.productItem(name: "Base58Swift", package: "Base58Swift"),
34+
.productItem(name: "Blake2", package: "Blake2.swift"),
35+
]
36+
)
37+
],
38+
swiftLanguageVersions: [
39+
.v5
40+
]
41+
)

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
</div>
99

10-
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/hashing-swift)](https://img.shields.io/cocoapods/v/hashing-swift)
10+
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/HashingSwift)](https://img.shields.io/cocoapods/v/HashingSwift)
1111
[![Swift](https://img.shields.io/badge/Swift-5.0.0-orange?style=flat-square)](https://img.shields.io/badge/Swift-5.0.0-Orange?style=flat-square)
1212
[![Telegram channel](https://img.shields.io/badge/chat-telegram-green.svg?logo=telegram)](https://t.me/sublabsupport)
1313
[![GitHub License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0)
@@ -30,12 +30,25 @@ Our goal is to have more developers to come into the world of development of cli
3030

3131
## Installation
3232

33+
### CocoaPods
34+
3335
[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Alamofire into your Xcode project using CocoaPods, specify it in your `Podfile`:
3436

3537
```ruby
3638
pod 'HashingSwift'
3739
```
3840

41+
### Swift Package Manager
42+
43+
The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler.
44+
45+
Once you have your Swift package set up, adding HashingSwift as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.
46+
47+
```swift
48+
.package(url: "https://github.com/sublabdev/hashing-swift.git", from: "1.0.0")
49+
```
50+
51+
3952
## Documentation
4053

4154
- Our GitBook: [https://docs.sublab.dev/swift-libraries/hashing-library](https://docs.sublab.dev/swift-libraries/hashing-library)
File renamed without changes.

0 commit comments

Comments
 (0)