You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-18Lines changed: 27 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,8 +19,8 @@
19
19
20
20
-[Core features](#core-features)
21
21
-[Installation](#installation)
22
-
-[CocoaPods](#cocoapods)
23
22
-[Swift Package](#swift-package)
23
+
-[CocoaPods](#cocoapods)
24
24
-[Example usage](#example-usage)
25
25
-[Send Ether](#send-ether)
26
26
-[Contract read method](#contract-read-method)
@@ -66,6 +66,27 @@
66
66
67
67
## Installation
68
68
69
+
### Swift Package (Recommended)
70
+
The [Swift Package Manager](https://swift.org/package-manager/"") is a tool for automating the distribution of Swift code that is well integrated with Swift build system.
71
+
72
+
Once you have your Swift package set up, adding `web3swift` as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.
Or if your project is not a package follow these guidelines on [how to add a Swift Package to your Xcode project](https://developer.apple.com/documentation/xcode/adding-package-dependencies-to-your-app).
80
+
81
+
82
+
## Example usage
83
+
In the imports section:
84
+
85
+
```swift
86
+
importweb3swift
87
+
importWeb3Core
88
+
```
89
+
69
90
### CocoaPods
70
91
71
92
[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:
@@ -91,23 +112,7 @@ Then, run the following command:
91
112
$ pod install
92
113
```
93
114
94
-
### Swift Package
95
-
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.
96
-
97
-
Once you have your Swift package set up, adding Alamofire as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.
> **WARNING**: CocoaPods is a powerful tool for managing dependencies in iOS development, but it also has some limitations that preventing us of providing first class support there. We highly recommend using SPM first as using CocoaPods will delay new updates and bug fixes being delivered to you.
111
116
112
117
### Send Ether
113
118
```swift
@@ -188,6 +193,10 @@ $ ganache
188
193
This will create a local blockchain and also some test accounts that are used throughout our tests.
189
194
Make sure that `ganache` is running on its default port `8546`. To change the port in test cases locate `LocalTestCase.swift` and modify the static `url` variable.
190
195
196
+
### Before you commit
197
+
198
+
We are using [pre-commit](https://pre-commit.com) to run validations locally before a commit is created. Please, install pre-commit and run `pre-commit install` from project's root directory. After that before every commit git hook will run and execute `codespell`, `swiftlint` and other checks.
199
+
191
200
## Contribute
192
201
Want to improve? It's awesome:
193
202
Then good news for you: **We are ready to pay for your contribution via [@gitcoin bot](https://gitcoin.co/grants/358/web3swift)!**
0 commit comments