A minimalistic Swift framework to help the implementation of the event-driven architecture pattern in Swift. (inspired by Redux)
- Clone or download the project;
- Copy the SwiftEventHandler.xcodeprojandSwiftEventHandlerin your project;
- Embed the SwiftEventHandler.xcodeprojin your Xcode project. This tutorial can help you do that.
- Create a file Package.swiftin the root folder of your project if it doesn't exist already;
- In the Package.swiftfile, specify theSwiftEventHandlerdependency. Here's what a newPackage.swiftfile may contain:
// swift-tools-version:4.2
import PackageDescription
let package = Package(
  name: "PackageName",
  dependencies: [
    .package(url: "https://github.com/yoshimkd/swift-event-handler.git",
             .exact("1.0.0"))
  ],
  targets: [
    .target(name: "TargetName",
            dependencies: ["SwiftEventHandler"],
            path: "path-to-the-container-of-the-source-files")
  ]
)
- Run swift buildin the folder that contains thePackage.swiftfile;
- Optionally, you can create an Xcode project by running swift package generate-xcodeproj.
