Contents

radianttap/coordinator

\

Installation

  • version 8.x is using Swift 6 language mode and has strict concurrency turned ON
  • version 7.x and up is made with Swift 5.5 concurrency in mind (async / await)
  • versions before that (6.x) use closures

Migrating to 8.1.0

Coordinator.init(rootViewController:) now takes a non-optional T instead of T?. The previous signature crashed on nil via preconditionFailure, so the only callers affected are those passing an explicit nil (which would have crashed anyway). Subclasses that construct their own root VC should build it before calling super.init(rootViewController:).

CoordinatingQueuedMessage is now @MainActor () -> Void. Closures passed to enqueueMessage(_:) already had to run on the main actor in practice; the annotation just makes the contract explicit.

NavigationCoordinator now offers async overloads of present(_:animated:) and dismiss(animated:) alongside the existing completion-based methods. They're purely additive — existing call sites keep working — but callers using structured concurrency can now write await coord.present(vc) instead of wrapping UIKit's completion API in a withCheckedContinuation themselves.

Just drag Coordinator folder into your project — it‘s only a handful of files.

Or add add this repo’s URL through Swift Package Manager.

Documentation

The why and how and...

License

MIT, as usual.

Give back

If you found this code useful, please consider buying me a coffee or two. ☕️😋

Package Metadata

Repository: radianttap/coordinator

Default branch: master

README: README.md