Releases: Maks-Jago/SwiftUI-UDF
1.4.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.
Critical Fix! Memory leak...
We found and fixed a critical memory leak that caused periodic crashes.