Skip to content

Commit a6bb875

Browse files
author
Jovan Jovanovski
committed
Update README.md
1 parent e4f336f commit a6bb875

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

README.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,37 @@
1-
# swift-event-handler
1+
# SwiftEventHandler
22
A minimalistic Swift framework to help the implementation of the event-driven architecture pattern in Swift. (inspired by Redux)
33

44
![](Diagram/SwiftEventHandler-diagram.png)
5+
6+
# See a demo project
7+
[RandomTable](https://github.com/yoshimkd/swift-event-handler-usage-demo)
8+
9+
# How you can use it
10+
## Manually
11+
1. Clone or download the project;
12+
2. Copy the `SwiftEventHandler.xcodeproj` and `SwiftEventHandler` in your project;
13+
3. Embed the `SwiftEventHandler.xcodeproj` in your Xcode project. [This tutorial](https://medium.com/flawless-app-stories/getting-started-with-reusable-frameworks-for-ios-development-f00d74827d11) can help you do that.
14+
15+
## With Swift Package Manager
16+
1. Create a file `Package.swift` in the root folder of your project if it doesn't exist already;
17+
2. In the `Package.swift` file, specify the `SwiftEventHandler` dependency. Here's what a new `Package.swift` file may contain:
18+
```
19+
// swift-tools-version:4.2
20+
21+
import PackageDescription
22+
23+
let package = Package(
24+
name: "PackageName",
25+
dependencies: [
26+
.package(url: "https://github.com/yoshimkd/swift-event-handler.git",
27+
.exact("1.0.0"))
28+
],
29+
targets: [
30+
.target(name: "TargetName",
31+
dependencies: ["SwiftEventHandler"],
32+
path: "path-to-the-container-of-the-source-files")
33+
]
34+
)
35+
```
36+
3. Run `swift build` in the folder that contains the `Package.swift` file;
37+
4. Optionally, you can create an Xcode project by running `swift package generate-xcodeproj`.

0 commit comments

Comments
 (0)