Skip to content

Releases: pointfreeco/swift-composable-architecture

0.31.0

20 Dec 21:42
9c162f4

Choose a tag to compare

  • 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 .alert and .confirmationDialog view modifiers.
  • Infrastructure: Simplified test store internals, fixed demo deprecation warnings

0.30.0

13 Dec 19:08
23155a0

Choose a tag to compare

  • Added: support for concurrency back-deployment!
  • Deprecated: TestStore.assert methods have been deprecated (use TestStore.send and TestStore.receive directly, instead).
  • Infrastructure: fixed binding SwiftUI case study (thanks @onevcat), modernize demos.

0.29.0

03 Dec 21:10
921272e

Choose a tag to compare

  • Added: Accessibility attribute support for TextState (thanks @ferologics).
  • Added: An overload of CaseLet without an action transformation has been added (thanks @ferologics).
  • Fixed: WithViewStore.debug no longer emits console output in the wrong order.
  • Fixed: AlertState.ButtonAction.type is 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

23 Sep 14:27
599a239

Choose a tag to compare

  • Fixed: The store's main thread checker now uses Thread.isMainThread instead 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

20 Sep 17:32

Choose a tag to compare

  • Added: Store.unchecked creates 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.binding overload that takes a key path to bindable state. I.e., viewStore.$field changes to viewStore.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 Store now 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 new Store.unchecked static 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:

    • AlertState has introduced a new initializer that takes any number of buttons.
    • ActionSheetState has been renamed to ConfirmationDialogState.
    • ConfirmationDialogState has introduced a new initializer that exposes titleVisibility.
    • View.actionSheet has been renamed to View.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 withAnimation blocks, which is the opposite behavior of bindings derived from @State, @ObservedObject, etc.

  • Cleaned up: The Store.ifLet UIKit helper has been simplified (thanks @iampatbrown).

  • Fixed: Xcode 12.4 support.

  • Deprecated: The Store.publisherScope method has been deprecated, as it was only used to drive the previous implementation of Store.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

15 Sep 01:18
a1aac6c

Choose a tag to compare

  • Changed: Effect.failing is 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 Store detects send was 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

07 Sep 16:30
e2795c1

Choose a tag to compare

  • Added: Store threading 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: BindingAction now conditionally conforms to CustomDebugStringConvertible (thanks @lukeredpath).
  • Fixed: deprecation messages for older binding helpers have been made more descriptive.
  • Infrastructure: added documentation for BindingAction.pullback.

0.26.0

06 Sep 15:20

Choose a tag to compare

  • Added: form binding helpers have been made safer and more concise with the introduction of BindableState and BindableAction (thanks @junebash for first bringing up the idea of BindableAction). 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 for BindableState.
  • Fixed: Store documentation 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

24 Aug 21:24
68664c1

Choose a tag to compare

  • Fixed: a regression introduced in 0.25.0, where TestStore failures 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 XCTAssertNoDifference instead of XCTAssertEqual.

0.25.0

23 Aug 02:50
575d7c0

Choose a tag to compare

  • 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.optional and other methods that took file and line parameters previously took them as unnamed arguments. They have been updated to take file and line as named arguments.
  • Infrastructure: refactored Tic-Tac-Toe to better model the board's domain with a nested Three data type.