# \#combine

**URL:** https://forums.swift.org/tag/combine/258.md

[Latest](https://forums.swift.org/latest.md) · [Categories](https://forums.swift.org/categories.md) · [Tags](https://forums.swift.org/tags.md)

---

## [DepotKit: a type-safe, composable key-value store for Apple platforms](https://forums.swift.org/t/depotkit-a-type-safe-composable-key-value-store-for-apple-platforms/90181)

<div class="topic-metadata">

**Author:** [@FKREISE](https://forums.swift.org/u/FKREISE)\
**Replies:** 3\
**Last updated:** [November 20, 2026, 1:58am UTC](https://forums.swift.org/t/depotkit-a-type-safe-composable-key-value-store-for-apple-platforms/90181 "2026-11-20T01:58:30Z")

</div>

Hi everyone! We've just open-sourced DepotKit, a type-safe, composable key-value store for Apple platforms. My team at Mercedes-Benz built it, and it has stored most of the local data in the Mercedes-Benz iOS app for the…

---

## [Publishable - synchronous observation of Observable changes through Combine](https://forums.swift.org/t/publishable-synchronous-observation-of-observable-changes-through-combine/79924)

<div class="topic-metadata">

**Author:** [@NSFatalError](https://forums.swift.org/u/NSFatalError)\
**Replies:** 3\
**Last updated:** [September 6, 2026, 2:41pm UTC](https://forums.swift.org/t/publishable-synchronous-observation-of-observable-changes-through-combine/79924 "2026-09-06T14:41:25Z")

</div>

I'm excited to share with you the second package I'm releasing this week - Publishable Excerpts from README: What Problem Publishable Solves? With the introduction of SE-0475: Transactional Observation of Values, Swif…

---

## [Combine and the road to Swift 6](https://forums.swift.org/t/combine-and-the-road-to-swift-6/65396)

<div class="topic-metadata">

**Author:** [@antonvmironov](https://forums.swift.org/u/antonvmironov)\
**Replies:** 7\
**Last updated:** [August 5, 2026, 4:27pm UTC](https://forums.swift.org/t/combine-and-the-road-to-swift-6/65396 "2026-08-05T16:27:58Z")

</div>

My team has been leveraging structured concurrency to build a relatively large feature. We have been using structured concurrency extensively, incorporating it into the data layer, UI, persistence, and other aspects wher…

---

## [SendablePublishers: Combine for Swift 6 strict concurrency](https://forums.swift.org/t/sendablepublishers-combine-for-swift-6-strict-concurrency/88794)

<div class="topic-metadata">

**Author:** [@Dmitriy\_Ignatyev](https://forums.swift.org/u/Dmitriy_Ignatyev)\
**Replies:** 0\
**Last updated:** [August 5, 2026, 3:56pm UTC](https://forums.swift.org/t/sendablepublishers-combine-for-swift-6-strict-concurrency/88794 "2026-08-05T15:56:02Z")

</div>

Swift 6's strict concurrency checking is one of the best things to happen to Apple's platforms in years, but disruptive, if your codebase is built on Combine. Combine has a problem when used in Swift 6 mode: Publisher, A…

---

## [Publishers.MakeConnectable leaks upstream publisher?](https://forums.swift.org/t/publishers-makeconnectable-leaks-upstream-publisher/86090)

<div class="topic-metadata">

**Author:** [@picnicbob](https://forums.swift.org/u/picnicbob)\
**Replies:** 0\
**Last updated:** [April 17, 2026, 5:28pm UTC](https://forums.swift.org/t/publishers-makeconnectable-leaks-upstream-publisher/86090 "2026-04-17T17:28:50Z")

</div>

I'm having trouble with Swift Combine resulting in leaks of upstream publishers, specifically when using makeConnectable(). I have created demo code to highlight the issue but it's complicated, so let me break down the v…

---

## [Got crashes while transitioning from NSLock to Mutex](https://forums.swift.org/t/got-crashes-while-transitioning-from-nslock-to-mutex/84696)

<div class="topic-metadata">

**Author:** [@CTMacUser](https://forums.swift.org/u/CTMacUser)\
**Replies:** 1\
**Last updated:** [February 12, 2026, 8:09pm UTC](https://forums.swift.org/t/got-crashes-while-transitioning-from-nslock-to-mutex/84696 "2026-02-12T20:09:21Z")

</div>

Granted, the code is modified AI slop. I asked this on another forum, and they directed me here. This is a successor to: https://developer.apple.com/forums/thread/814231 I went into a slightly different direction. I…

---

## [Publishers.CombineLatest.values loses values](https://forums.swift.org/t/publishers-combinelatest-values-loses-values/83677)

<div class="topic-metadata">

**Author:** [@andrii\_chernenko](https://forums.swift.org/u/andrii_chernenko)\
**Replies:** 6\
**Last updated:** [December 13, 2025, 6:39am UTC](https://forums.swift.org/t/publishers-combinelatest-values-loses-values/83677 "2025-12-13T06:39:21Z")

</div>

Consider the following code: struct CombineLatestTests { @Test func \`combineLatest subscriber receives all values\`() async throws { // Given let firstPublisher = CurrentValueSubject\<Int, Nev…

---

## [Testing an async subscriber for a Combine publisher](https://forums.swift.org/t/testing-an-async-subscriber-for-a-combine-publisher/83679)

<div class="topic-metadata">

**Author:** [@andrii\_chernenko](https://forums.swift.org/u/andrii_chernenko)\
**Replies:** 0\
**Last updated:** [December 11, 2025, 10:42pm UTC](https://forums.swift.org/t/testing-an-async-subscriber-for-a-combine-publisher/83679 "2025-12-11T22:42:51Z")

</div>

My goal is to implement a version of the \`sink\` operator from Combine that can run asynchronous code. I’m targeting Swift 5 language mode. Here’s what I came up with: extension Publisher where Failure == Never { fu…

---

## [How cursed is my Type Erasing pattern?](https://forums.swift.org/t/how-cursed-is-my-type-erasing-pattern/83355)

<div class="topic-metadata">

**Author:** [@ARG07](https://forums.swift.org/u/ARG07)\
**Replies:** 4\
**Last updated:** [November 30, 2025, 6:24pm UTC](https://forums.swift.org/t/how-cursed-is-my-type-erasing-pattern/83355 "2025-11-30T18:24:42Z")

</div>

Hi, I am developing an library to be used internally in our team. I currently have an Type Erasing system that works. But I am having doubts about its maintainability since it feels awkward to even look at and I couldn’…

---

## [Is @Published implemented using CurrentValueSubject](https://forums.swift.org/t/is-published-implemented-using-currentvaluesubject/82604)

<div class="topic-metadata">

**Author:** [@EndBird](https://forums.swift.org/u/EndBird)\
**Replies:** 0\
**Last updated:** [October 10, 2025, 12:15am UTC](https://forums.swift.org/t/is-published-implemented-using-currentvaluesubject/82604 "2025-10-10T00:15:29Z")

</div>

I’m curious to know how \<@Published\> is implemented underneath the hood. Its behaviour seems identical to CurrentValueSubject so I was wondering if that’s how it is. Why this is interesting to me is, if say I created a…

---

## [Is Combine Reactive?](https://forums.swift.org/t/is-combine-reactive/82525)

<div class="topic-metadata">

**Author:** [@ranveerm](https://forums.swift.org/u/ranveerm)\
**Replies:** 2\
**Last updated:** [October 6, 2025, 6:27pm UTC](https://forums.swift.org/t/is-combine-reactive/82525 "2025-10-06T18:27:49Z")

</div>

I've searched through the documentation of Combine and looked at all the WWDC videos, and nowhere does Apple mentioned anything about "Reactive Programming". Apple states that The Combine framework provides a declarati…

---

## [Crash in Combine Related to Swift 6 Concurrency](https://forums.swift.org/t/crash-in-combine-related-to-swift-6-concurrency/75178)

<div class="topic-metadata">

**Author:** [@aetherealtech](https://forums.swift.org/u/aetherealtech)\
**Replies:** 5\
**Last updated:** [September 9, 2025, 2:32pm UTC](https://forums.swift.org/t/crash-in-combine-related-to-swift-6-concurrency/75178 "2025-09-09T14:32:06Z")

</div>

I was writing a test for a custom Publisher, and to simplify the asynchrony inherent in the test I marked the test function as @MainActor (that way closures can write back to reference captured local values without racin…

---

## [Combine Interop with Swift Concurrency](https://forums.swift.org/t/combine-interop-with-swift-concurrency/81088)

<div class="topic-metadata">

**Author:** [@markturnip](https://forums.swift.org/u/markturnip)\
**Replies:** 7\
**Last updated:** [July 26, 2025, 4:54am UTC](https://forums.swift.org/t/combine-interop-with-swift-concurrency/81088 "2025-07-26T04:54:32Z")

</div>

I’m not here to debate whether Combine is “dead.” Personally, I believe Swift Concurrency and Combine both continue to serve real-world needs - one leaning imperative, the other functional-reactive. I recently revisited…

---

## [Promise is non-sendable type](https://forums.swift.org/t/promise-is-non-sendable-type/68383)

<div class="topic-metadata">

**Author:** [@Parabak](https://forums.swift.org/u/Parabak)\
**Replies:** 9\
**Last updated:** [July 24, 2025, 8:23am UTC](https://forums.swift.org/t/promise-is-non-sendable-type/68383 "2025-07-24T08:23:57Z")

</div>

Hey guys, Enabling StrictConcurrency check raise a warning on our Future extension: extension Future where Failure == Error, Output: Sendable { convenience public init(\_ asyncFunction: @escaping @Sendable () asyn…

---

## [Lack of SendableMetaType for Combine's Subscriber makes it impossible to use it in Swift 6.2](https://forums.swift.org/t/lack-of-sendablemetatype-for-combines-subscriber-makes-it-impossible-to-use-it-in-swift-6-2/80464)

<div class="topic-metadata">

**Author:** [@gwendal.roue](https://forums.swift.org/u/gwendal.roue)\
**Replies:** 4\
**Last updated:** [June 14, 2025, 10:49am UTC](https://forums.swift.org/t/lack-of-sendablemetatype-for-combines-subscriber-makes-it-impossible-to-use-it-in-swift-6-2/80464 "2025-06-14T10:49:14Z")

</div>

(Cross-posted from the feedback FB18050331) The Combine Subscriber protocol does not currently conform to SendableMetaType. This lack of conformance makes it impossible to use it without compiler errors or warnings si…

---

## [Adding Publisher conformance to a class breaks expected computed property getter calls](https://forums.swift.org/t/adding-publisher-conformance-to-a-class-breaks-expected-computed-property-getter-calls/80365)

<div class="topic-metadata">

**Author:** [@dankinsoid](https://forums.swift.org/u/dankinsoid)\
**Replies:** 1\
**Last updated:** [June 9, 2025, 7:56am UTC](https://forums.swift.org/t/adding-publisher-conformance-to-a-class-breaks-expected-computed-property-getter-calls/80365 "2025-06-09T07:56:26Z")

</div>

I’ve encountered a weird behavior: when I add a Publisher conformance to a class, setters and getters of it's properties stop be called. This code works as expected: import Foundation import Combine struct Box { le…

---

## [How to subscribe to an actor's publisher?](https://forums.swift.org/t/how-to-subscribe-to-an-actors-publisher/75742)

<div class="topic-metadata">

**Author:** [@mylaluna](https://forums.swift.org/u/mylaluna)\
**Replies:** 13\
**Last updated:** [April 24, 2025, 10:08am UTC](https://forums.swift.org/t/how-to-subscribe-to-an-actors-publisher/75742 "2025-04-24T10:08:37Z")

</div>

In the middle of adapting swift 6, I have converted some of my singleton classes to global actors. Following is one example: @globalActor actor MyActor: ObservableObject { static let shared = MyActor() …

---

## [Testing Publisher Value Updates with Async Tasks: How to Properly Wait for Changes in Tests?](https://forums.swift.org/t/testing-publisher-value-updates-with-async-tasks-how-to-properly-wait-for-changes-in-tests/79227)

<div class="topic-metadata">

**Author:** [@angu-software](https://forums.swift.org/u/angu-software)\
**Replies:** 5\
**Last updated:** [April 11, 2025, 6:51pm UTC](https://forums.swift.org/t/testing-publisher-value-updates-with-async-tasks-how-to-properly-wait-for-changes-in-tests/79227 "2025-04-11T18:51:08Z")

</div>

Hi everyone, I’ve been working on testing a class that uses a @Published property, where an async task is triggered by a method, and eventually, the published value is updated. Initially, I had trouble testing the async…

---

## [AsyncPublisher and Sendable](https://forums.swift.org/t/asyncpublisher-and-sendable/65466)

<div class="topic-metadata">

**Author:** [@tourultimate](https://forums.swift.org/u/tourultimate)\
**Replies:** 11\
**Last updated:** [April 2, 2025, 7:22pm UTC](https://forums.swift.org/t/asyncpublisher-and-sendable/65466 "2025-04-02T19:22:20Z")

</div>

As far as I can tell AsyncPublisher and AsyncThrowingPublisher are not Sendable. I'm trying to address the Sendable warnings in our code when compiling with strict-concurrency. The aforementioned types do not seem to b…

---

## ['sink' never is called when using 'receive'](https://forums.swift.org/t/sink-never-is-called-when-using-receive/27703)

<div class="topic-metadata">

**Author:** [@filimo](https://forums.swift.org/u/filimo)\
**Replies:** 11\
**Last updated:** [March 28, 2025, 8:09pm UTC](https://forums.swift.org/t/sink-never-is-called-when-using-receive/27703 "2025-03-28T20:09:55Z")

</div>

I noticed that 'sink' never was called when using 'receive' . I tested on Xcode 11 beta 5. public enum SomeError: Error { case someError } Just("1") .tryMap { val -\> String in if Bool.random() { throw SomeError…

---

## [\[Combine\] How to \`debounce\` specific events only?](https://forums.swift.org/t/combine-how-to-debounce-specific-events-only/66129)

<div class="topic-metadata">

**Author:** [@ylorn](https://forums.swift.org/u/ylorn)\
**Replies:** 6\
**Last updated:** [March 6, 2025, 5:07am UTC](https://forums.swift.org/t/combine-how-to-debounce-specific-events-only/66129 "2025-03-06T05:07:41Z")

</div>

Say we have following events: enum Events { case initial case ongoing case enabled case disabled case error(Error) } and all these events is published on an ObservableObject: class Observer: Observ…

---

## [What is the correct way to observe the changes from within a nested \`ObservableObject\`?](https://forums.swift.org/t/what-is-the-correct-way-to-observe-the-changes-from-within-a-nested-observableobject/62788)

<div class="topic-metadata">

**Author:** [@ylorn](https://forums.swift.org/u/ylorn)\
**Replies:** 15\
**Last updated:** [January 17, 2025, 4:22pm UTC](https://forums.swift.org/t/what-is-the-correct-way-to-observe-the-changes-from-within-a-nested-observableobject/62788 "2025-01-17T16:22:55Z")

</div>

import Combine final class StringController: ObservableObject { @Published var string: String = "" } final class IntController: ObservableObject { @Published var int: Int = 0 } final class AggregatedControlle…

---

## [Move from Combine to Swift concurrency?](https://forums.swift.org/t/move-from-combine-to-swift-concurrency/76658)

<div class="topic-metadata">

**Author:** [@mj604](https://forums.swift.org/u/mj604)\
**Replies:** 16\
**Last updated:** [January 1, 2025, 11:46pm UTC](https://forums.swift.org/t/move-from-combine-to-swift-concurrency/76658 "2025-01-01T23:46:32Z")

</div>

Hi, I am currently rethinking a project that contains about 70.000 lines of mostly Combine code. I used Combine not so much because of the concurrency aspect, but because of the reactive nature of the problem. The code…

---

## [Is it fair to declare Combine's AnyPublisher as unchecked sendable as long as output & error types are sendable?](https://forums.swift.org/t/is-it-fair-to-declare-combines-anypublisher-as-unchecked-sendable-as-long-as-output-error-types-are-sendable/76343)

<div class="topic-metadata">

**Author:** [@bao](https://forums.swift.org/u/bao)\
**Replies:** 12\
**Last updated:** [December 8, 2024, 9:44pm UTC](https://forums.swift.org/t/is-it-fair-to-declare-combines-anypublisher-as-unchecked-sendable-as-long-as-output-error-types-are-sendable/76343 "2024-12-08T21:44:44Z")

</div>

Right now Combine publishers are not sendable, so we get warnings (or error if Swift 6 language mode is enabled) if we pass a publisher across actor boundaries. Is there any downside in doing something like: extension …

---

## [@Published properties and the main thread](https://forums.swift.org/t/published-properties-and-the-main-thread/51880)

<div class="topic-metadata">

**Author:** [@tourultimate](https://forums.swift.org/u/tourultimate)\
**Replies:** 6\
**Last updated:** [December 6, 2024, 12:37pm UTC](https://forums.swift.org/t/published-properties-and-the-main-thread/51880 "2024-12-06T12:37:01Z")

</div>

I am working on a library, a Swift package. We have quite a few properties on various classes that can change and we think the @Published property wrapper is a good way to annotate these properties as it offers a built-i…

---

## [Why no compiler error for this Swift Concurrency/Combine code?](https://forums.swift.org/t/why-no-compiler-error-for-this-swift-concurrency-combine-code/75897)

<div class="topic-metadata">

**Author:** [@mjholgate](https://forums.swift.org/u/mjholgate)\
**Replies:** 7\
**Last updated:** [November 10, 2024, 12:21pm UTC](https://forums.swift.org/t/why-no-compiler-error-for-this-swift-concurrency-combine-code/75897 "2024-11-10T12:21:15Z")

</div>

Hi there, The sample code below compiles fine in both Swift 5 and Swift 6 language modes with no errors or warnings. I would expect it to fail with an error or warning because the sink closure attempts to call the recei…

---

## [Is this a bug in @Published?](https://forums.swift.org/t/is-this-a-bug-in-published/31292)

<div class="topic-metadata">

**Author:** [@clayellis](https://forums.swift.org/u/clayellis)\
**Replies:** 70\
**Last updated:** [November 7, 2024, 10:36pm UTC](https://forums.swift.org/t/is-this-a-bug-in-published/31292 "2024-11-07T22:36:03Z")

</div>

Is this a bug in the @Published property wrapper or am I expecting a different behavior because I've misunderstood something fundamental? Given: import Combine class Test { @Published var value = 0 var value…

---

## [Combine flatMap can result in values after failure - bug?](https://forums.swift.org/t/combine-flatmap-can-result-in-values-after-failure-bug/27834)

<div class="topic-metadata">

**Author:** [@mfclarke](https://forums.swift.org/u/mfclarke)\
**Replies:** 3\
**Last updated:** [October 23, 2024, 4:01am UTC](https://forums.swift.org/t/combine-flatmap-can-result-in-values-after-failure-bug/27834 "2024-10-23T04:01:30Z")

</div>

Hi, I'm seeming some odd behaviour with failure handling and the flatMap operator. It seems that if a Publisher inside a flatMap fails, this doesn't result in downstream publishers entering a failed state where no more v…

---

## [Memory leak issue while asynchronously iterating over async sequence](https://forums.swift.org/t/memory-leak-issue-while-asynchronously-iterating-over-async-sequence/64584)

<div class="topic-metadata">

**Author:** [@vigdora](https://forums.swift.org/u/vigdora)\
**Replies:** 4\
**Last updated:** [June 9, 2023, 1:01pm UTC](https://forums.swift.org/t/memory-leak-issue-while-asynchronously-iterating-over-async-sequence/64584 "2023-06-09T13:01:28Z")

</div>

I am having memory leak issue while iterating over async sequence like so: import Foundation import Combine class MyServiceClass { let timerSequence = Timer.publish(every: 1, on: .main, in: .default).autoconne…

---

## [\`.first()\` and \`.prefix(1)\` different behaviors?](https://forums.swift.org/t/first-and-prefix-1-different-behaviors/74749)

<div class="topic-metadata">

**Author:** [@pitt](https://forums.swift.org/u/pitt)\
**Replies:** 0\
**Last updated:** [September 19, 2024, 4:20pm UTC](https://forums.swift.org/t/first-and-prefix-1-different-behaviors/74749 "2024-09-19T16:20:48Z")

</div>

Hello! I noticed a behavioral difference between first() and prefix(1) and I'm not sure why this happens - I might just not understand something here. I'm basically doing a flatMapLatest with a side-effect (don't judge…

[Next page](https://forums.swift.org/tag/combine/258.md?match_all_tags=true&page=1&tags%5B%5D=combine)
