Releases: pointfreeco/swift-composable-architecture
0.31.0
- Changed: Upstream dependency requirements have been bumped to bring in bug fixes.
- Changed: Concurrency tools now require Xcode 13.2 or greater.
- Fixed: Worked around an iOS 14 SwiftUI availability check crash affecting the
.alertand.confirmationDialogview modifiers. - Infrastructure: Simplified test store internals, fixed demo deprecation warnings
0.30.0
0.29.0
- Added: Accessibility attribute support for
TextState(thanks @ferologics). - Added: An overload of
CaseLetwithout anactiontransformation has been added (thanks @ferologics). - Fixed:
WithViewStore.debugno longer emits console output in the wrong order. - Fixed:
AlertState.ButtonAction.typeis public again (thanks @Thomvis). - Infrastructure: demo app modernization and cleanup (thanks @iampatbrown, @kgrigsby59).
- Infrastructure: documentation fixes (thanks @malonehedges).
- Infrastructure: CI now runs on Xcode 13.1 (thanks @ferologics).
0.28.1
- Fixed: The store's main thread checker now uses
Thread.isMainThreadinstead of dispatch specific keys for its thread checking mechanism. This should reduce the chance of the thread checker getting caught when a non-main queue runs on the main thread.
0.28.0
-
Added:
Store.uncheckedcreates a store that opts out of main thread checks. Use this function to create background stores that are not intended to drive UI. -
Changed: Dynamic member lookup on view stores to bindable state has been deprecated in favor of a new
ViewStore.bindingoverload that takes a key path to bindable state. I.e.,viewStore.$fieldchanges toviewStore.binding(\.$field).The dynamic member lookup syntax introduced in 0.26.0 unfortunately broke support for reducers layering logic onto mutations of nested fields of bindable state via pattern matching, e.g.:
switch action { case .binding(\.$userSettings.displayName):
To restore this functionality, we must work directly with the equivalent nested key path in the view, instead.
// before: TextField("Display name", text: viewStore.$userSettings.displayName) // after: TextField("Display name", text: viewStore.binding(\.$userSettings.displayName))
For more information on this change, see #810.
-
Changed: The
Storenow comes with a main thread check by default. If a store is created or interacted with off the main thread, including sending actions, scoping, or receiving/completing effects off the main thread, a breakpoint will catch in debug builds. If you are using a store on a non-main thread, use the newStore.uncheckedstatic function to construct a store instead. -
Changed: Alert APIs have been updated to call the new SwiftUI APIs under the hood when available. As such, the following changes have been made:
AlertStatehas introduced a new initializer that takes any number of buttons.ActionSheetStatehas been renamed toConfirmationDialogState.ConfirmationDialogStatehas introduced a new initializer that exposestitleVisibility.View.actionSheethas been renamed toView.confirmationDialog.
-
Changed: Animated view store bindings now match the behavior of vanilla SwiftUI (thanks @iampatbrown).
-
Changed: store publisher subscriptions are now deterministic (thanks @iampatbrown).
This change mainly affects UIKit-based apps that call
viewStore.publisher.sink. The vanilla Combine behavior of the store's current value subject is non-deterministic. That is multiple subscriptions to a single subject do not receive output in a deterministic order. Stores are now driven by a custom publisher, instead, that emits values to subscribers in a deterministic way.In previous versions of the Composable Architecture, view store binding animations could not be overridden with
withAnimationblocks, which is the opposite behavior of bindings derived from@State,@ObservedObject, etc. -
Cleaned up: The
Store.ifLetUIKit helper has been simplified (thanks @iampatbrown). -
Fixed: Xcode 12.4 support.
-
Deprecated: The
Store.publisherScopemethod has been deprecated, as it was only used to drive the previous implementation ofStore.ifLet. If you depend on this method, please let us know how. -
Removed: Deprecations introduced before swift-composable-architecture 0.17.0 have been removed. If you are upgrading from an earlier version, do so incrementally to see these notices and fix-its.
-
Infrastructure: cleaned up speech recognition case study.
0.27.1
- Changed:
Effect.failingis now available outside of debug builds (thanks @andreyz). - Fixed:
BindableState's codable conformances should now use any coding strategies for single values, e.g.JSONEncoder's data and date-decoding strategies. - Fixed: Xcode 13 RC will now build for macOS <12.
- Improved: documentation around
BindingAction.pullback. - Improved: breakpoint messaging for when
Storedetectssendwas called on a thread other than the thread the store was created on. - Infrastructure: alert and action sheet case study cleanup (thanks @filblue).
0.27.0
- Added:
Storethreading issues are now surfaced with new debug code: if you send an action or an effect is received on the wrong thread, a breakpoint will be caught and message will be printed to the console (thanks @IanKeen). - Added:
BindingActionnow conditionally conforms toCustomDebugStringConvertible(thanks @lukeredpath). - Fixed: deprecation messages for older binding helpers have been made more descriptive.
- Infrastructure: added documentation for
BindingAction.pullback.
0.26.0
- Added: form binding helpers have been made safer and more concise with the introduction of
BindableStateandBindableAction(thanks @junebash for first bringing up the idea ofBindableAction). The existing binding helpers have been deprecated. Note: this feature depends on Xcode 12.5 or greater to avoid a crash produced by earlier versions of the compiler, which was fixed in 5.4. For more information, see the documentation forBindableState. - Fixed:
Storedocumentation had some typos (thanks @kgrigsby59). - Cleanup:
Effect.future's has implementation has been simplified (thanks @iampatbrown). - Infrastructure: cleaned up how dependencies are handled in the reusable download component case study.
- Infrastructure: added cancellation to the "loadable" case studies (thanks @filblue).
0.25.1
- Fixed: a regression introduced in 0.25.0, where
TestStorefailures were no longer printed in a proportional diff format, has been addressed. - Fixed: removed a redundant conformance (thanks @aroben).
- Infrastructure: the Composable Architecture's test suite now uses
XCTAssertNoDifferenceinstead ofXCTAssertEqual.
0.25.0
- Added: the Composable Architecture now uses Custom Dump for its debugging and testing tools. This library improves upon the original debugging/diffing tools that came with earlier versions of the Composable Architecture by collapsing unchanged parts of the diff, and more.
- Added: a French translation of the README (thanks @nikitamounier).
- Changed:
ViewStore.suspend(while:)now uses Combine's async/await tools under the hood (thanks @iampatbrown for further cleanup). - Changed:
Reducer.optionaland other methods that tookfileandlineparameters previously took them as unnamed arguments. They have been updated to takefileandlineas named arguments. - Infrastructure: refactored Tic-Tac-Toe to better model the board's domain with a nested
Threedata type.