Repository navigation
Releases: dmytro-ipatii/Dovetail
Releases · dmytro-ipatii/Dovetail
Release list
v0.1.0
The first release of Dovetail: modular SwiftUI building blocks for iOS apps. Each module ships as its own library product, so your app imports only what it needs.
New module: DovetailRouter
Navigation for SwiftUI that you trigger from code. Push screens and present sheets, full screen covers, custom modals, alerts and confirmation dialogs from anywhere in your view hierarchy.
DovetailRouterViewwraps a flow and owns itsNavigationStackand every presentation.Routeris the protocol your views and view models depend on:showScreen(_:content:),showModal,showAlert,showConfirmationDialog, and a dismiss method for each.SegueOptionsets how a screen is presented:.push,.sheetor.fullScreenCover.AlertContent,ConfirmationDialogContentandButtonContentdescribe alerts and dialogs, with a text or custom-view message.@Environment(\.dovetailRouter)gives nested views the router without passing it down.MockRouteris a router that does nothing, for previews and tests.
import DovetailRouter
@main
struct MyApp: App {
var body: some Scene {
WindowGroup {
DovetailRouterView { router in
HomeView(router: router)
}
}
}
}
// Each new screen gets its own router.
router.showScreen(.push) { router in
DetailView(router: router)
}
router.showAlert(content: AlertContent(
title: "Delete item?",
message: "This can't be undone.",
actions: [
ButtonContent(label: "Cancel", role: .cancel) {},
ButtonContent(label: "Delete", role: .destructive) { deleteItem() }
]
))Installation
.package(url: "https://github.com/dmytro-ipatii/Dovetail.git", from: "0.1.0")Then add the DovetailRouter product to your target. In Xcode, go to File → Add Package Dependencies… and tick only the products you need.
Requirements
- iOS 18+
- Swift 6.0+ (Xcode 16+)
Notes
This is a 0.x release, so the API may change between minor versions until 1.0. Bug reports, ideas and contributions are welcome. See CONTRIBUTING.md.
Full changelog: CHANGELOG.md