SwiftUI library providing a customizable circular/linear progress indicator. Distributed as a Swift Package (SPM).
swift build # build the library
swift test # run the ProgressUITests suite
swift build -c release # release build
xcodebuild -scheme ProgressUI -destination 'generic/platform=iOS Simulator' buildUnit tests live in Tests/ProgressUITests/ (XCTest). To exercise UI changes interactively, open Example/Example.xcodeproj (iOS/macOS/watchOS targets) and run the Example scheme.
If a bare
swift build/swift testfails with an SDK/compiler mismatch (e.g. "failed to build module 'Darwin'… SDK is built with a different Swift version"), theswiftonPATHis an older standalone toolchain (e.g. swiftly) that doesn't match the Xcode SDK. Run via Xcode's toolchain instead:xcrun swift build/xcrun swift test.
Package.swift— single library targetProgressUI. Supports iOS 14+, macOS 11+, macCatalyst 14+, watchOS 7+, tvOS 15+, visionOS 1+. Any new API must be available on all of these.Sources/ProgressUI/Components/ProgressUI/— public entry point.ProgressUI.swift— theProgressUISwiftUIView.ProgressUI+Modifiers.swift— fluent.option(...)style modifiers.ProgressUI+ViewModel.swift— internal observable state.
Components/BaseProgress.swift— shared shape/animation scaffolding.Components/CircularProgress.swift,LinearProgress.swift— the twoShapeimplementations selected viaOptions.shape.Options.swift— the single configuration struct passed intoProgressUI.Progressable.swift— protocol consumers implement to drive dynamic coloring (color, optionalinnerColor,calculate(from:)).Shape.swift,GrowDirection.swift,ProgressSize.swift— small enums used byOptions.
Example/— multi-platform sample app demonstrating usage.
- Public API surface is
ProgressUI,Options,Progressable,Shape,GrowDirection,ProgressSize. Treat changes to these as semver-relevant. - Configuration flows through
Options— prefer adding a field there over adding new initializers onProgressUI. - State-driven coloring is opt-in via the generic
statusType:parameter taking aProgressable.Type. - Keep view-extension files (
ProgressUI+*.swift) split by concern rather than collapsing into the main view file.
main— stable, release-only. Every commit onmaincorresponds to a tagged release; never commit feature work directly here.develop— the integration branch. All day-to-day work merges here first.feature/*— branch offdevelop, merge back intodevelopvia PR. CI (build + test across all platforms) must be green before merge.release/*— cut fromdevelopwhen preparing a version: bump the version, finalizeCHANGELOG.md, then merge into bothmain(tagged) anddevelop.hotfix/*— branch offmainfor urgent fixes, merge into bothmain(tagged) anddevelop.- Tag releases with semantic versions (
MAJOR.MINOR.PATCH); public-API changes to the types above drive the version bump. UpdateCHANGELOG.mdunder[Unreleased]as you go. - Open PRs against
develop(notmain).