Releases: Fueled/ios-utilities
Drop support for ReactiveSwift
Swift Package Manager Support
Combine and SwiftUI additions
New Features/Enhancements
-
Add
ActionProtocol
-
Add
AnyAction
, allowing to type-erase any actions represented by aActionProtocol
-
Add
CoalescingAction
&OverridingAction
-
Add a
CombineExtensions
&CombineExtensionsProvider
protocol, replicating the.reactive
of ReactiveSwift (so as not to pollute too much the global namespace) -
All
NSObject
now can have acancellables
object attached to them via<object>.combineExtensions.cancellables
. It's created lazily, so there's impact if not used. -
Extend
Publisher.handleEvents
to add two new hooks:receiveTermination
: When either a completion or a cancellation is receivedreceiveResult
: Takes aResult
, and called when either values are received or an error is received
-
Add
Publisher.promoteOptional()
-
Add
then(receiveResult:)
, which takes a closure with aResult
, allowing to handle values & error in the same place -
Add
sinkForLifetimeOf(_:)
methods family, allowing to sink on a publisher and link to the lifetime of a givenCombineExtensionsProvider & AnyObject
. The goal of this is to avoid having to write the classic boilerplate code in Combine handling with having to createcancellables
for every single object (this used thecancellables
extension mentioned above). -
Add
performDuringLifetimeOf(_:action:)
, allowing to link an action with the lifetime of an object. This act as an equivalent formakeBindingTarget
fromReactiveSwift
when calling functions or assigning multiple variables. -
Add
assign(to:forLifetimeOf:)
, allowing to assign the output of the producer to a keyPath, keeping it alive until the specified object is deallocated. -
Add
TapAction
and<UIControl>.combineExtensions.tapped
, allowing to link anAction
to a button, without having to do the bindings manually (similar toUIButton.reactive.pressed
in ReactiveCocoa) -
Add
<UIControl>.publisherForControlEvent(_:)
, to get a publisher that triggers on any control events. -
Add
(UITextField/UITextView).(textValues|continuousTextValues)
, which are equivalent to same thing as for ReactiveCocoa.
Stéphane Copin
#54 -
Add an optional
insets
parameter toaddAndFitSubview()
-
Make
removeArrangedSubviews()
'sremoveFromHierachy
parameter default totrue
-
Add
tapped
helper to link anyReactiveActionProtocol
to anyUIControl
-
Add
AnyIdentifiable
&AnyAction
for type-erasedIdentifiable
&ReactiveActionProtocol
respectively -
Add
OverridingAction
, a newAction
that if executed when already executing, will cancel the previous producer and start a new one -
Make
OrderedSet
conform toSetAlgebra
Stéphane Copin
#53
Bug Fixes
-
Fix a bug in
CombineLatestMany
where cancelling the resulting publisher would not cancel the array of publishers themselves.
Stéphane Copin
#55 -
Fix a bug in
Action
where a cancellation would be ignored and not setisExecuting
tofalse
Stéphane Copin
#54 -
Fix an internal state corruption issue in
OrderedSet
Stéphane Copin
#53
Breaking changes
- The original
TapAction
,OverridingAction
andAnyAction
were all prefixed withReactive
.
Stéphane Copin
#54
Combine & SwiftUI initial additions
Add many Combine & SwiftUI helpers, and remove all deprecated previously items.
This release also introduces subspecs, allowing to specify exactly what you're looking to use within FueledUtils.
Maintenance release: bug fixes
Merge pull request #39 from Fueled/paging-fixes fix(paging): Fix paging formulas
Swift 5, RAS 6, RAC 10
Deprecated methods and classes have been marked unavailable.
Backwards compatibility fix
This is the last release to support Swift 4.2
Update to RAC 9, add support for tvOS
Merge pull request #29 from Fueled/rac-9 chore(project): update to rac9 and include needed sources for tvOS.
Xcode 10 update, library updates.
Merge pull request #21 from Fueled/modernisation chore(project): Update Swift version and dependencies.
Reactive updates
Merge pull request #15 from Fueled/reactive-swift-update Reactive swift update