Skip to content

Commit 380c0c6

Browse files
Merge pull request #762 from VaishaliDesai/update-readme
2 parents 705704c + 081a552 commit 380c0c6

File tree

1 file changed

+23
-18
lines changed

1 file changed

+23
-18
lines changed

README.md

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020
- [Core features](#core-features)
2121
- [Installation](#installation)
22-
- [CocoaPods](#cocoapods)
2322
- [Swift Package](#swift-package)
23+
- [CocoaPods](#cocoapods)
2424
- [Example usage](#example-usage)
2525
- [Send Ether](#send-ether)
2626
- [Contract read method](#contract-read-method)
@@ -66,6 +66,27 @@
6666

6767
## Installation
6868

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`.
73+
```swift
74+
dependencies: [
75+
.package(url: "https://github.com/web3swift-team/web3swift.git", .upToNextMajor(from: "3.0.0"))
76+
]
77+
```
78+
79+
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+
import web3swift
87+
import Web3Core
88+
```
89+
6990
### CocoaPods
7091

7192
[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:
91112
$ pod install
92113
```
93114

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`.
98-
```swift
99-
dependencies: [
100-
.package(url: "https://github.com/web3swift-team/web3swift.git", .upToNextMajor(from: "3.0.0"))
101-
]
102-
```
103-
104-
## Example usage
105-
In the imports section:
106-
107-
```swift
108-
import web3swift
109-
import Web3Core
110-
```
115+
> **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.
111116
112117
### Send Ether
113118
```swift

0 commit comments

Comments
 (0)