Menu

Post image 1
Post image 2
1 / 2
0

TCA 1.7 @ObservableState + Swift 6 — Tracing the @Reducer Macro Isolation Trap

DEV Community·Morgan·22 days ago
#FtAqKWsL
#attempt#side#ios#swift#fullscreen#macro
Reading 0:00
15s threshold

A retrospective of tracing the @Reducer / @ObservableState macro isolation trap in 5 attempts during new development of a personal iOS app on TCA 1.25.5. Under Swift 6 strict concurrency + module-default isolation inference, the macros auto-generate conformances that are forced to be main-actor-isolated, breaking compatibility with nonisolated struct . Starting Point — Deprecation Warnings During New Development I started building a personal app on TCA 1.25.5 from scratch. As soon as I wrote the first entry screen (an API key input form) using the WithViewStore pattern, the Issue Navigator lit up with deprecation warnings: 'WithViewStore' is deprecated: Use '@ObservableState' instead. 'init(_:observe:content:file:line:)' is deprecated: Use '@ObservableState' instead. 'ViewStoreOf' is deprecated: Use '@ObservableState' instead.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More