Shared repository for architecture and other iOS helpers.

Related tags

Utility ArchKit
Overview

ArchKit

A shared package for all the infrastructure required to support the Architecture styles I use in my own apps.

Very shortly, this architecture is centered around Combines, and passing events between types using Combine publishers.

From a top-down perspective we have:

  1. Coordinator - these types manage user-level Actions, and can send those types of events up to parent coordinators. Coordinators typically map 1-1 to a ViewController, which can either be a container controller, or one actually showing views.
  2. UIViewController - Either container controllers or otherwise. These interact directly with View objects (either SwiftUI or UIKit) to translate events from the User to things shown on the view. View Controllers here serve to keep Coordinators from having to care about/interact directly with Views.
  3. View types are only concerned with showing UI to users, and reacting to them.

This also contains a number of other subpackages and helpers, because I don't care to split them off into their own repository:

  • ArchKit
    • Coordinator.swift is the big one, already detailed above.
    • Withable.swift is a protocol for setting properties via their keypaths, which is really useful for using the builder pattern with objective-c types.
  • Combine Extensions
    • CombineExtensions.swift contains a number of extensions on Combine that make life a bit easier.
      • Future.success creates an already-finished Future with the given output.
      • Future.failure creates an already-finished Future with the given error.
      • -firstOutputAsFuture() on Publisher returns a Future that completes once either it receives a value, or if it receives an error. Whichever comes first.
      • -send(to:finishSubject:) on Publisher forwards events from the receiver onto the given Subject. It returns an AnyCancellable.
      • mergeManyAndKeepOrder takes an array of Futures with the same Output and Failure types and returns a single Future that's finished with an array of Output from those futures, in the same order those futures were given in.
    • UIControl+Combine.swift extends UIControl such that it can create a publisher for when the given UIControl.Events happen.
  • UIKit Extensions
    • UIKitExtensions.swift contains a number of helpers and extensions to make view layout in UIKit more declarative and easier to deal with.
    • UIKit+Withable.swift contains a number of helpers for using the builder pattern with some classses.
You might also like...
TypeStyle is a handy app for iPhone and iPad that generates text using different styles and decorations. It is a native Swift iOS app.
TypeStyle is a handy app for iPhone and iPad that generates text using different styles and decorations. It is a native Swift iOS app.

TypeStyle TypeStyle is a handy app for iPhone and iPad that generates text using different styles and decorations. It is a native Swift iOS app. Featu

An open source Instapaper clone that features apps and extensions that use native UI Components for Mac and iOS.
An open source Instapaper clone that features apps and extensions that use native UI Components for Mac and iOS.

TODO: Screenshot outdated Hipstapaper - iOS and Mac Reading List App A macOS, iOS, and iPadOS app written 100% in SwiftUI. Hipstapaper is an app that

 Zip - A Swift framework for zipping and unzipping files. Simple and quick to use. Built on top of minizip.
Zip - A Swift framework for zipping and unzipping files. Simple and quick to use. Built on top of minizip.

Zip A Swift framework for zipping and unzipping files. Simple and quick to use. Built on top of minizip. Usage Import Zip at the top of the Swift file

Useful Swift code samples, extensions, functionalities and scripts to cherry-pick and use in your projects

SwiftyPick 🦅 🍒 Useful Swift code samples, extensions, functionalities and scripts to cherry-pick and use in your projects. Purpose The idea behind t

Swift-DocC is a documentation compiler for Swift frameworks and packages aimed at making it easy to write and publish great developer documentation.

Swift-DocC is a documentation compiler for Swift frameworks and packages aimed at making it easy to write and publish great developer docum

A handy collection of Swift method and Tools to build project faster and more efficient.

SwifterKnife is a collection of Swift extension method and some tools that often use in develop project, with them you might build project faster and

Paul Hudson redesigned and remastered the original MoonshotApp. And so I followed the tutorial
Paul Hudson redesigned and remastered the original MoonshotApp. And so I followed the tutorial

Moonshot App for iOS. parsing some json files, using generics, and creating multi page app. Application provides simple informations from the Apollo m

Async+ for Swift provides a simple chainable interface for your async and throwing code, similar to promises and futures
Async+ for Swift provides a simple chainable interface for your async and throwing code, similar to promises and futures

Async+ for Swift provides a simple chainable interface for your async and throwing code, similar to promises and futures. Have the best of both worlds

A lightweight extension to Swift's CollectionDifference, supporting moves in addition to removals and insertions, critical when updating interfaces and managing reference types.

DifferenceTracker is a lightweight extension to Swift's CollectionDifference. It defines moves in addition to removals and insertions, critical when updating interfaces and managing reference types.

Owner
Rachel Brindle
Rachel Brindle
SwiftExtensionKit - SwiftExtensionKit is to contain generic extension helpers for UIKit and Foundation

RichAppz PureSwiftExtensionKit SwiftExtensionKit is to contain generic extension

Rich Mucha 0 Jan 31, 2022
Customize and resize sheets in SwiftUI with SheeKit. Utilise the power of `UISheetPresentationController` and other UIKit features.

SheeKit Customize and resize sheets in SwiftUI with SheeKit. Utilise the power of UISheetPresentationController and other UIKit features. Overview She

Eugene Dudnyk 67 Dec 31, 2022
A Swift package for rapid development using a collection of micro utility extensions for Standard Library, Foundation, and other native frameworks.

ZamzamKit ZamzamKit is a Swift package for rapid development using a collection of micro utility extensions for Standard Library, Foundation, and othe

Zamzam Inc. 261 Dec 15, 2022
A μframework of extensions for SequenceType in Swift 2.0, inspired by Python's itertools, Haskell's standard library, and other things.

SwiftSequence Full reference here. (If you're looking for data structures in Swift, those have been moved to here) SwiftSequence is a lightweight fram

Donnacha Oisín Kidney 376 Oct 12, 2022
Pure Declarative Programming in Swift, Among Other Things

Basis The Basis is an exploration of pure declarative programming and reasoning in Swift. It by no means contains idiomatic code, but is instead inten

TypeLift 314 Dec 22, 2022
A repository for showcasing my knowledge of the Swift programming language, and continuing to learn the language.

Learning Swift (programming language) I know very little about programming in the Swift programming language. This document will go over all my knowle

Sean P. Myrick V19.1.7.2 2 Nov 8, 2022
Repository for all the programs and Code I would write in Swift.

Swift Programming Language This repository contains the program and codes I write in Swift About Swift Swift is a general-purpose, multi-paradigm, com

Kannan Jayachandran 2 Sep 21, 2022
Validate iOS, Android, and Mac localizations. Find errors in .strings, .stringsdict, and strings.xml files.

Locheck An Xcode and Android localization file validator. Make sure your .strings, .stringsdict, and strings.xml files do not have any errors! What do

Asana 73 Dec 13, 2022
Easy CBOR encoding and decoding for iOS, macOS, tvOS and watchOS.

CBORCoding CBORCoding is a lightweight framework containing a coder pair for encoding and decoding Codable conforming types to and from CBOR document

Joe Newton 23 Nov 8, 2022