Releases: Maks-Jago/SwiftUI-UDF
1.4.7 - Bindable
What's Changed
- BindableReducer and BindableContainer by @Maks-Jago in #29, #30
- Hooks by @boredarthur in #37
- Documentation by @OksanaFedorchuk in #44
- Fix/bindable container load unload issue by @Maks-Jago in #46
- Task flow Id by @boredarthur in #47
- Navigation updates by @Maks-Jago in #49
- fix/replace-array-with-set-for-middlewares by @kiddden in #48
- Added NavigateStepsBack and NavigateStepsBackTyped actions by @ValentinPetrulia in #53
- Delayed action by @Maks-Jago in #52
Full Changelog: 1.4.6...1.4.7
New Contributors
- @kiddden made their first contribution in #48
- @ValentinPetrulia made their first contribution in #53
More Details
- Full Documentation: SwiftUI-UDF is now fully documented with code examples, detailed descriptions, and usage guides.
- BindableReducer/BindableContainer: You can now mark any reducer as
@BindableReducer
and bind it to aBindableContainer
. This allows dynamic creation and removal of reducers based on the container’s lifecycle. Recursive transitions and simultaneous instances of multiple containers are now fully supported. UDF will create as many reducers as there are instances ofBindableContainer
. - Global Router Update: Aligned with iOS 18 changes, the router lifecycle has been updated. The
navigationDestination(for routing:)
method replaces the oldernavigationDestination(router:)
and should now be placed as high in the view hierarchy as possible. - macOS Support: Improved macOS compatibility—no more errors.
- Delayed Action: Added a new
with(delay:)
modifier, allowing delays for individual actions or ActionGroups. - Hooks: Introduced a Hook entity with
HookBuilder
, enabling conditional execution of code blocks based on custom triggers. Define hooks via overriddenuseHook
in a container, and initialize them with init or static functions. - Subscribe method in
Store
is now synchronous. ThesubscribeAsync
method is deprecated and will be removed in v1.5.0. - Store Optimizations: Improved stability and increased StoreQueue throughput, doubling the number of actions processed concurrently.
And of course 100500 improvements and minor updates.
Keep Coding!
1.4.6 - GlobalRouting
In UDF 1.4.6, the navigation system receives a major upgrade with the introduction of GlobalRouting.
This new approach provides a streamlined way to control navigation flow, offering deep integration with SwiftUI via the Environment(.globalRouter) or predefined actions. The system enhances flexibility by allowing developers to manipulate the navigation stack, handle deep links, and reset navigation with ease—making it a powerful tool for building dynamic, navigable apps.
What was done:
- Navigation Overhaul: Introduced GlobalRouting to facilitate robust, programmatic control over SwiftUI navigation. This system provides access to navigation through
Environment(\.globalRouter)
or predefined actions, offering extensive capabilities such as stack management, deep linking, and resetting the navigation state. - Typed and Untyped Navigation Actions: Expanded with
Actions.NavigateTyped
andActions.Navigate
for flexible manipulation of navigation stacks from anywhere in the app. - UDF Alert Enhancements: The new
AlertActionBuilder
simplifies the process of constructing alerts with customizable actions and introduces support forAlertTextField
, enabling input fields in alerts.AlertButton
now allows buttons to specify roles via ButtonRole. - OrderedDictionary Enhancements: Now supports the mergeable protocol, improving data handling.
- ActionGroup Builder Improvements: Now handles optionals, allowing conditional action construction.
Previous Release Enhancements:
- XCTestStore Update: Decoupled from MainActor, now utilizing its own globalActor.
- New Test Utilities: Added
XCTUnwrapAsync
for unwrapping async values, and enhanced get wait functionality for test cases. - Middleware Enhancements: Unified Concurrency and Combine middleware, with the introduction of
MiddlewareBuilder
for streamlined and flexible middleware construction and segmentation of subscription blocks.
And of course 100500 improvements and minor updates.
Keep Coding!
Full Changelog: 1.4.5...1.4.6
1.4.2 - Swift 5.9.2
Swift 5.9.2
1.4.1 - Store optimizations
1.4.1 (#16) * add code to Error action * fix macos errors * IsolatedState as detached task * add new subscribeAsync * change Isolated store to useStore, add queue sync to effect result * optimise memory management * add new store queue * safety calls * state copy * iOS 15 fallback methods (#13) * add ios15 fallback methods to notify middlewares * Update NewObservableMiddlewareDDosProtectionTests.swift * RC 1 * Fix/interactive (#14) * fix interactive delays * changes * Fix/field (#15) * changes * add store task priority
1.4.0 - Concurrency
Swift Concurrency on board!
We have been working for a long time on preparing a huge release with many changes, optimizations and upgrades to the SwiftUI-UDF Architecture.
And now, UDF architecture has got concurrency support for the Middleware layer!
What was done:
- Store is getting smarter and smarter and becomes an Actor to guarantee and sync state mutations and accesses;
- Middleware layer got separation on BaseMiddleware (Combine version) and BaseConcurrencyMiddleware (Swift Concurrency) with separation on Observable/Reducible;
- All types of middlewares got the
Environment
to describe dependencies and build them in thebuildLiveEnvironment
andbuildTestEnvironment
methods; - Container got a new re-rendering system to control which part of the State mutation would cause a re-rendering. The scope of work;
func scope(for state: SourceOfTruth<ContainerState>) -> Scope
- Animations support. Since now we can add animation modifier for Action use withAnimation function;
Actions.SomeAction().withAnimation(.linear)
- Silent action. We have added the option to dispatch an action without logging to the loggers. Use silent function, such action won't be logged to loggers.
- New logging system.
ActionLogger
,ActionFilter
,ActionDescriptor
to be able to dynamically add any loggers (Console, Crashlytics, Files, etc). InitialSetup
protocol. If some reducer needs the State for initial setup.
func initialSetup(with state: State)
- XCTestStore is MainActor since now.
And of course 100500 improvements and minor updates.
Keep Coding!
Full Changelog: 1.3.x...1.4.x
1.3.2 - macOS support
Merge pull request #2 from Maks-Jago/feature/macOS-support macOS support
1.3.0 - Relamquad
This release is the biggest update UDF has ever had!
We've done great work in analyzing and upgrading all aspects of UDF development to provide more and more tools for fast, scalable, and independent apps building.
What was done:
- Middleware layer got huge updates. ObservableMiddleware came to replace Sync/Async middlewares, which is smarter and easier in use.
- ObservableMiddleware It has one new method
override func scope(for state: SourceOfTruth<State>) -> Scope
, the aim of which is to provide a 'scope of work'. The middleware will only observe the changes of reducers mentioned in the scope method and ignore other app state changes. The Scope method is required to be overridden in all ObservableMiddleware subclasses; - Scope can be combined up to 5 reducers
Scopes.Combined(...);
- Also, the Middleware layer has got one new player - is ReducibleMiddleware. The main difference is that the ReducibleMiddleware is a reducer in the middleware world, that doesn't observe any flows and reduce the actions in the
open func reduce(_ action: AnyAction)
; - The Store is getting smarter and smarter. Since 1.3.0 Store can decide to group dispatched actions, monitor State changes and control the numbers of SwiftUI Views re-rendering, middlewares calls, and can ignore some actions if State is not mutated;
- The View layer got Routing as a protocol for navigating between containers and Router class to manage navigation;
- A new action
Actions.DidCancelEffect
, that is called when the Middleware cancels an effect; - Testing-testing-testing.
XCTestStore
it's a new Store for using only in the Unit tests, which works in sync mode and on the main thread;
And of course 100500 improvements and minor updates.
Keep Coding!
1.2.0
State management optimizations
- Optimized the number of re-rendering after state mutation;
- Added Equatable requirements to all Reducers for mutation detecting;
- Added DispatchFilter to AsyncMiddleware;
- Added Noops (Equatable, Hashable);
- Optimized dispatching of actions to the Store.
Fixed order of dispatched actions (several actions or group action)
Fixed an intermittent error with actions order when dispatching several actions or action group.