Skip to content

3.0.0#244

Open
pauljohanneskraft wants to merge 35 commits into
masterfrom
feature/3.0.0
Open

3.0.0#244
pauljohanneskraft wants to merge 35 commits into
masterfrom
feature/3.0.0

Conversation

@pauljohanneskraft

@pauljohanneskraft pauljohanneskraft commented May 5, 2023

Copy link
Copy Markdown
Collaborator

Breaking changes

  • Dropped StrongRouter / WeakRouter / UnownedRouter / AnyRouter / WeakErased / UnownedErased / AnyCoordinator / AnyTransitionPerformer in favor of Swift 5.7+ existentials. Migration: StrongRouter →
    any Router; WeakRouter/UnownedRouter → weak/unowned any Router.
  • Coordinator is now generic over its root view controller, not its transition type: BaseCoordinator<RouteType, TransitionType> → BaseCoordinator<RouteType, RootViewController>.
  • Removed TransitionProtocol — use the concrete Transition directly. A small new TransitionContext protocol covers the few non-generic spots (contextTrigger, deep linking). Also removed
    TransitionPerformer (folded into Coordinator) and the internal TransitionComponent layer.
  • router(for:) takes a type now: router(for: R.self) -> (any Router)?.
  • Entire API is @mainactor; Router is AnyObject-constrained so it can be held weakly.
  • Platform/tooling bump: Swift tools 5.1→5.9; min deployment iOS/tvOS 9 → iOS/tvOS 16.
  • XCoordinatorCombine product removed — Combine support now ships in the main target behind #if canImport(Combine). XCoordinatorRx stays separate (RxSwift 6.0→6.5).

SwiftUI integration (new)

  • @routing property wrapper to pull a router from the environment in a view.
  • RoutingController (UIHostingController bridge) and WrappedRouter (host a coordinator inside SwiftUI).
  • Declarative modifiers: .router(_:), .redirect(to:map:), .triggerOnAppear, .triggerOnChange, .trigger(when:).
  • Transition.withAnimation / withTransaction to drive SwiftUI state from transitions.

Transitions

  • @TransitionBuilder result builder — prepareTransition(for:) is now a result builder, so transitions read as a declarative switch instead of manual composition. New builder-closure initializers on
    BaseCoordinator/BasicCoordinator.

Other additions

  • async/await triggers: await router.trigger(.route), …with: options, await router.contextTrigger(…).
  • children is now on the Coordinator protocol, with child deallocation/lifecycle fixes.
  • Context menus replace 3D-Touch peek/pop — CoordinatorPreviewingDelegateObject (deprecated since iOS 13) is gone, replaced by a UIContextMenuInteraction delegate that previews + commits a route.

Docs & structure

  • Jazzy → Swift-DocC (.docc bundle + swift-docc-plugin + CI workflow); removed docs/, .jazzy.yaml, jazzy scripts.
  • Source reorganized into grouped folders (Coordinators/, Navigation/, Tab/, SwiftUI/, Transitions/, …).
  • Added a TestHost app and new test suites (SwiftUI routing, trigger modifiers, context menu, child lifecycle, async/Combine, transition builder).

@andrefmsilva

Copy link
Copy Markdown

Hi @pauljohanneskraft, any news about this?

@pauljohanneskraft

Copy link
Copy Markdown
Collaborator Author

Hey @andrefmsilva ! I'm still working on some of these changes and think of some additional features (or if there is going to be some anyways), but I would like to have that finished, since these changes will require a major version update. Do you already have any remarks regarding the current changes in this branch?

@andrefmsilva

Copy link
Copy Markdown

Hi, i will update my app to use this branch and run some tests to see if i find some problem.

@pauljohanneskraft pauljohanneskraft marked this pull request as ready for review June 1, 2026 09:24
Copilot AI review requested due to automatic review settings June 1, 2026 09:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@pauljohanneskraft

Copy link
Copy Markdown
Collaborator Author

@copilot Please review, leave out the docs/ directory, as those simply remove existing documentation documents, which are replaced with DocC built on demand by the CI.

Copilot AI commented Jun 1, 2026

Copy link
Copy Markdown

@copilot Please review, leave out the docs/ directory, as those simply remove existing documentation documents, which are replaced with DocC built on demand by the CI.

I reviewed the non-doc changes and didn’t find any actionable issues on my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants