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:
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.UIViewController- Either container controllers or otherwise. These interact directly withViewobjects (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.- 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.swiftis the big one, already detailed above.Withable.swiftis a protocol for setting properties via their keypaths, which is really useful for using the builder pattern with objective-c types.
 - Combine Extensions 
  
CombineExtensions.swiftcontains a number of extensions on Combine that make life a bit easier.Future.successcreates an already-finishedFuturewith the given output.Future.failurecreates an already-finishedFuturewith the given error.-firstOutputAsFuture()onPublisherreturns aFuturethat completes once either it receives a value, or if it receives an error. Whichever comes first.-send(to:finishSubject:)onPublisherforwards events from the receiver onto the givenSubject. It returns anAnyCancellable.mergeManyAndKeepOrdertakes an array ofFutures with the sameOutputandFailuretypes and returns a singleFuturethat's finished with an array ofOutputfrom those futures, in the same order those futures were given in.
UIControl+Combine.swiftextendsUIControlsuch that it can create a publisher for when the givenUIControl.Events happen.
 - UIKit Extensions 
  
UIKitExtensions.swiftcontains a number of helpers and extensions to make view layout in UIKit more declarative and easier to deal with.UIKit+Withable.swiftcontains a number of helpers for using the builder pattern with some classses.