1059 Commits

Author SHA1 Message Date
Seungwoo Choe
c0227a19ba Remove duplicate step in Multiple presentation destinations tutorial (#3810) 2025-10-30 10:57:01 -07:00
Brandon Williams
ee008e1e81 Fix warnings from existential and deprecation (#3800)
* Use explicit 'any' for existential.

* Fix deprecation warning.
2025-10-17 12:07:24 -07:00
Stephen Celis
2ef7c09b0b Update reportIssue formatting to avoid console errors (#3795)
When a non-ASCII character is fed to `reportIssue`, the following is
output to the console:

```
<decode: bad range for [%@] got [offs:330 len:1073 within:0]>
```

This causes a lot of confusion for folks, so let's update the formatting
to avoid this.
2025-10-16 10:35:05 -05:00
Pyry Jahkola
ae2515f93f Skip perception checks in Store.publisher (#3745)
* Add failing test using store.publisher in makeUIView

* Skip perception checks in store publisher

---------

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2025-10-15 09:57:18 -07:00
Stephen Celis
a9c3fecb5d Add delay to child dismissal (#3796)
By immediately `nil`-ing out the child store, SwiftUI can misbehave in a
number of ways.

This PR attempts to fix #3789, #3783, #3779.
2025-10-13 14:59:38 -07:00
Stephen Celis
9424b18a64 Fix 6.2 compilation failure 2025-10-13 09:51:31 -07:00
mbrandonw
3eb62da6fe Run swift-format 2025-10-09 01:28:37 +00:00
Brandon Williams
552e757b2c Remove mainActorNow tool where not needed. (#3788)
* Remove mainActorNow tool where not needed.

* wip
2025-10-08 20:18:34 -05:00
Stephen Celis
2918fcf109 Hard-deprecate @Reducer(state: .equatable) (#3794)
These have been soft-deprecated for a long time in favor of folks using
explicit extensions, but people seem to still be reaching for these
APIs.

Let's finally hard-deprecate them.
2025-10-08 11:56:22 -07:00
Stephen Celis
149fdf9c20 Use SPI docs instead of self-hosted (#3791)
* Use SPI docs instead of self-hosted

Fixes #3785.

* wip
2025-10-08 09:28:11 -07:00
larryonoff
0ac46b3af4 Remove TaskResult from docs (#3792) 2025-10-06 09:35:59 -05:00
Arsatius Regler
a851f820f3 Add support for naming tasks in .run effects (#3784)
* Add support for naming tasks in .run effects

* Cleanup

* fix

* typo

* wip

* wip

---------

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2025-09-26 18:21:37 -07:00
Terry Koo(Bonsung Koo)
f080048015 Fix typo: ContactFeature → ContactsFeature in tutorial code (#3782) 2025-09-20 07:53:28 -05:00
Lody
85eb525714 Fix use #filePath for filePath defaults (#3773)
- Use #filePath (not #fileID) as the default for filePath in Binding.scope, ObservedObject.Wrapper.scope, and SwiftUI.Bindable.scope.
- This corrects issue-reporting metadata so diagnostics reference the correct file path.
2025-09-15 12:47:12 -05:00
JP Simard
d772c216bb Make _PrintChangesReducer conditionally Sendable if Base is Sendable (#3759) 2025-09-03 17:52:45 -07:00
Brandon Williams
acd9bb8a7c Allow store publisher to be used as async sequence. (#3763)
* Allow store publisher to be used as async sequence.

* Update StoreTests.swift

* Update publisher to use withState for currentState

---------

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2025-08-29 12:01:32 -07:00
Stephen Celis
4429f7b144 Perception checking: Fall back on current perception state (#3762)
* Suppress more potential perception checks/warnings

* wip
2025-08-29 10:51:56 -07:00
Brandon Williams
56389302ca Better way to detect cancellation. (#3755) 2025-08-22 13:42:53 -07:00
Stephen Celis
1da96de161 Fix retain cycle regression from 1.21 (#3756) 2025-08-22 13:27:15 -07:00
stephencelis
9dae1ff6f6 Run swift-format 2025-08-19 00:47:57 +00:00
Ryan Carver
af60ed2d51 Add shouldNotifyObservers to ObservableState (#3751)
* add shouldNotifyObservers support to ObservableState

* update tests

* move shouldNotifyObservers logic into ObservationState

* fix test for macro change

* Fix test

* wip

* update xcode on ci

* wip

* wip

* wip

* wip

---------

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2025-08-18 17:47:27 -07:00
Stephen Celis
27db3dfc9f UIKit: Skip UIBindable perception checks (#3744) 2025-08-05 13:05:30 -07:00
Brandon Williams
4c47829a08 Perception fix for ScopedCore. (#3742) 2025-08-04 16:12:02 -05:00
Stephen Celis
af0a2c7408 Perception 2.0 (#3736)
* Perception 2.0

* wip

* wip

* wip

* wip

* wip

* Revert "wip"

This reverts commit c5d0a06017.

* wip
2025-07-30 11:16:38 -07:00
Brandon Williams
d83d00c13d Remove child store from parent when invalidated (#3729)
* Clear child store from parent when it is invalidated.

* wip

* wip

* wip
2025-07-21 20:00:05 -07:00
stephencelis
b914abbd73 Run swift-format 2025-07-17 20:57:21 +00:00
Stephen Celis
5cd90c330d Propagate current navigation path to cancellable publisher effects (#3728)
* Propagate navigation ID to escaping closure in cancellation.

* Add test

* wip

* wip

---------

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2025-07-17 13:49:06 -07:00
Stephen Celis
8730c8f733 Remove outdated thread-safety docs (#3701)
* Remove outdated thread-safety docs

The Store is now `@MainActor`, so I think we can remove these warnings.

* Update ViewStore.swift

* Update Store.swift

* wip

* wip
2025-06-20 08:32:51 -07:00
Brandon Williams
510a776fb9 Apply Equatable in tutorial step. (#3700) 2025-06-10 10:04:58 -07:00
hmhv
f25b26dc63 fix typo (#3697) 2025-06-01 14:52:03 -07:00
AndrewBardallis
294ac2cbfe Prevent reduce function from being optimized (#3683) 2025-05-22 10:06:03 -07:00
Jiaxin Shou
62adec579e Fix typo (#3684) 2025-05-13 10:40:50 -05:00
mbrandonw
3b0144906c Run swift-format 2025-05-07 16:12:55 +00:00
Brandon Williams
6d6f2b46f6 Isolate cancellation in root stores. (#3660)
* Isolate cancellation in root stores.

* clean up

* wip

* fix cancellation id prefix.

* wip
2025-05-07 11:12:23 -05:00
ryota
8e8ce78858 Fix: Build error occurs in navigation tutorial and Remove unnecessary button actions (#3668)
* fix: Navigation using ifLet

* fix: Cannot refer to `.addContact`

* fix: delete unused button

* fix: Grammar mistakes

* Not necessary to specify full destination state type.

* wip

---------

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2025-05-07 09:48:18 -05:00
Evan
47f753c622 Change Counter to CounterFeature in Stack Nav docs (#3670)
Afaict this was just a typo, and the example code was referring to Counter where it should have referred to CounterFeature
2025-05-07 09:30:41 -05:00
Johan Kool
abd1331571 Adjust documentation for binding action (#3661)
Afaict the $ sign shouldn't used to match on a binding as was done in this documentation snippet.
2025-04-18 07:11:56 -07:00
stephencelis
b1d27a82b4 Run swift-format 2025-04-16 18:05:49 +00:00
Schultz Alexis
e05c8fa486 expose navigation stack helper behind SPI (#3657) 2025-04-16 11:05:17 -07:00
Stephen Celis
529ad401fd Remove hashable requirement from UIPushAction (#3652)
This requirement isn't needed, since the hashability occurs in the
internals of `StackState`.
2025-04-11 13:40:46 -07:00
Stephen Celis
cf4177a222 Invalidate child store subscriptions (#3646)
* Cut off firehose when core is invalid.

* wip

---------

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2025-04-07 14:57:25 -07:00
Stephen Celis
23eb5ac23a Remove outdated warning text (#3643)
Fixes #3545.
2025-04-02 14:19:31 -07:00
Stephen Celis
fd409c79ea Update MigratingTo1.19.md 2025-04-01 17:06:38 -07:00
stephencelis
a36e28e345 Run swift-format 2025-04-01 23:53:03 +00:00
Stephen Celis
3927f26ed2 Store: ObservableObject (#3625)
* Add ObservableObject conformance and related tools.

* wip

* clean up

* wip

* Address flakiness?

---------

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2025-04-01 16:52:34 -07:00
Luke Redpath
a6371b6552 Enable binding workaround in release builds (#3640)
* fix: Enable binding workaround in release builds

* Address flaky test

* Make flakey tests easier to troubleshoot

---------

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2025-04-01 16:25:07 -07:00
Julien Sagot
2a9f48e9f3 Use swift-navigation helpers for presenting alerts and action sheets (#3623) 2025-04-01 15:47:06 -07:00
Arnaud Dorgans
073610217a RootCore crash (#3638)
* fix crash deinit outside MainActor

* Alternative: Mark AnyCancellable closures as sendable.

---------

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2025-03-27 13:34:28 -07:00
stephencelis
292546d3b9 Run swift-format 2025-03-27 00:24:44 +00:00
Stephen Celis
d4d1df8102 Store internals: Refactor RootStore/ToState to "Core" protocol composition (#3460)
* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* get rid of originating action

* wip

* wip

* Deprecate non-writable scopes

* Revert "Deprecate non-writable scopes"

This reverts commit 95570eb602.

* wip

---------

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2025-03-26 17:24:11 -07:00