Skip to content

Commit d838a4b

Browse files
committed
Merge branch 'master' of github.com:WeTransfer/UINotifications
2 parents 51e56f9 + a4d5490 commit d838a4b

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,40 @@ UINotificationCenter.current.isDuplicateQueueingAllowed = true
186186

187187
## Installation
188188

189+
### Swift Package Manager
190+
191+
The [Swift Package Manager](https://swift.org/package-manager/) is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.
192+
193+
#### Manifest File
194+
195+
Add Mocker as a package to your `Package.swift` file and then specify it as a dependency of the Target in which you wish to use it.
196+
197+
```swift
198+
import PackageDescription
199+
200+
let package = Package(
201+
name: "MyProject",
202+
platforms: [
203+
.macOS(.v10_15)
204+
],
205+
dependencies: [
206+
.package(url: "https://github.com/WeTransfer/UINotifications.git", .upToNextMajor(from: "1.3.0"))
207+
],
208+
targets: [
209+
.target(
210+
name: "MyProject",
211+
dependencies: ["UINotifications"]),
212+
.testTarget(
213+
name: "MyProjectTests",
214+
dependencies: ["MyProject"]),
215+
]
216+
)
217+
```
218+
219+
#### Xcode
220+
221+
To add Mocker as a [dependency](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app) to your Xcode project, select *File > Swift Packages > Add Package Dependency* and enter the repository URL.
222+
189223
### CocoaPods
190224

191225
[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:

0 commit comments

Comments
 (0)