Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andyfinnell/appstatekit
Unidirectional dataflow app architecture framework for SwiftUI apps
https://github.com/andyfinnell/appstatekit
Last synced: about 1 month ago
JSON representation
Unidirectional dataflow app architecture framework for SwiftUI apps
- Host: GitHub
- URL: https://github.com/andyfinnell/appstatekit
- Owner: andyfinnell
- License: mit
- Created: 2021-04-24T17:11:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-23T17:16:20.000Z (5 months ago)
- Last Synced: 2024-06-23T18:30:06.690Z (5 months ago)
- Language: Swift
- Size: 257 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# AppStateKit
A Elm-like framework for building SwiftUI based apps. Influenced by Pointfree Co's
The Composable Architecture, Redux, and Elm.It changes at my whim, and is almost always in a state of a rewrite as I explore
new ideas. As a result, the most recent is `main`, not any tagged release.Currently AppStateKit leverages Swift macros to build Elm-like Components and
automatically compose them together. Components combine the reducer and the view
together in one type, while keeping the reducer testable apart from the view.## Requirements
- Swift 5.9 or greater
- iOS/tvOS 17 or greater OR macOS 14 or greater## Installation
Currently, AppStateKit is only available as a Swift Package.
### ...using a Package.swift file
Open the Package.swift file and edit it:
1. Add AppStateKit repo to the `dependencies` array.
1. Add AppStateKit as a dependency of the target that will use it```Swift
// swift-tools-version:5.9import PackageDescription
let package = Package(
// ...snip...
dependencies: [
.package(url: "https://github.com/andyfinnell/AppStateKit.git", branch: "main")
],
targets: [
.target(name: "MyTarget", dependencies: ["AppStateKit"])
]
)
```Then build to pull down the dependencies:
```Bash
$ swift build
```### ...using Xcode
Use the Swift Packages tab on the project to add AppStateKit:
1. Open the Xcode workspace or project that you want to add AppStateKit to
1. In the file browser, select the project to show the list of projects/targets on the right
1. In the list of projects/targets on the right, select the project
1. Select the "Swift Packages" tab
1. Click on the "+" button to add a package
1. In the "Choose Package Repository" sheet, search for "https://github.com/andyfinnell/AppStateKit.git"
1. Click "Next"
1. Choose the `main` branch rule
1. Click "Next"
1. Choose the target you want to add AppStateKit to
1. Click "Finish"