Questions tagged [publisher]

325 questions
1
vote
3 answers

Why my views are not Rendered in SwiftUI even though the Publisher emits a value

I am having a username textField in swiftUI. I am trying to validate input with the help of publishers. Here is my code: View struct UserView: View { @StateObject private var userViewModel = UserViewModel() init(){ …
Ahmed
  • 1,229
  • 2
  • 20
  • 45
1
vote
1 answer

How to FlatMap a Publisher of two Tuples into a Publisher with one Tuple

I have the following code private var codeState : AnyPublisher<((Bool,Bool,Bool,Bool),(Bool,Bool)), Never> { let publ1 = Publishers.CombineLatest4(firstCodeAnyPublisher,secondCodeAnyPublisher,thirdCodeAnyPublisher,fourthCodeAnyPublisher) …
Ahmed
  • 1,229
  • 2
  • 20
  • 45
1
vote
1 answer

MQTT subscription not receiving messages C++

I'm trying to implement a MQTT subscription and publisher to my C++ application. The publishing is working just fine, but it looks like the subscriber isn't receiving any massages at all. #include "MbedJSONValue.h" #include "OLEDDisplay.h" #include…
1
vote
1 answer

How to combine two requests but return generic publisher? Details below

I have a generic function used to send requests to the server. Now before I send a request I need to check if the session token is expired and update it if needed. my function looks like this func upload(some parameters here) ->…
AlexanderZ
  • 2,128
  • 3
  • 20
  • 24
1
vote
1 answer

Use result of publisher in map of another publisher

As example I have a basic published value like @Published var value: String I have want to validates this value of my form to give my user an output. For that I will use Combine in my MVVM project. Now this type of value needs to be validated…
Nitaco
  • 13
  • 3
1
vote
1 answer

Swift Combine - Does the zip operator retain all values that it hasn't had a chance to publish?

Here's the code I'm wondering about: final class Foo { var subscriptions = Set() init () { Timer .publish(every: 2, on: .main, in: .default) .autoconnect() …
jeremyabannister
  • 3,796
  • 3
  • 16
  • 25
1
vote
0 answers

SwiftUI: How to pass @Published variable to function parameter and get value

The following code works and assigns the topLeftGameState to a timer. If the globalGameState changes to running, the topLeftGameState changes accordingly. @Published var topLeftGameState: GameState = .notReady @Published var topRightGameState:…
kuzdu
  • 7,124
  • 1
  • 51
  • 69
1
vote
1 answer

Swift Combine: handle no data before decode without an error

My API usually returns a certain format in JSON (simplified notation): { status: // http status error?: // error handle data?: // the response data ... } In my Combine operators, I take the data from a URLSession dataTaskPublisher and…
Mundi
  • 79,884
  • 17
  • 117
  • 140
1
vote
1 answer

SwiftUI ObservedObject does not updated when new items are added from a different view

I have a view model which handles the loading of new data once the app launches and when a new item is added. I have an issue when it comes to showing new items when are added from a new view, for example, a sheet or even a NavigationLink. View…
G B
  • 2,323
  • 3
  • 18
  • 32
1
vote
1 answer

swift Janus can not publish video, but get remote video successful - can not know reason

im tried to use Janus to call in videoroom. the problem is the remote video success to display, but only publisher can not show in janus videoroom, after check log i see : RTCIceConnectionState didChange state 1 RTCIceConnectionState didChange state…
famfamfam
  • 396
  • 3
  • 8
  • 31
1
vote
1 answer

How to access the subscriptions from the given publisher? (combine kit)

Is there any way to get the subscriptions by accessing the publisher? In the below example, I created a publisher, and had it subscribed by two subscribers and had the publisher send a value. Here in this simple scenario, all works are thrown…
pearl7721
  • 320
  • 1
  • 12
1
vote
1 answer

Publisher VBA MailMerge - Converting to PDF

I have Publisher document with MailMerge records. My goal is to convert each page with each record to separate PDF document. I have written this code. It generates PDF files with correct names, but for some reason PDFs contain only the second record…
1
vote
2 answers

Facebooker Rails plugin - Notifications

I have quite silly question: how to send notifications? For example, when I register user on my app, I want to welcome him/her with notification.
r13
  • 117
  • 1
  • 9
1
vote
1 answer

Add filter to Publisher mail merge from Excel

I have a macro in Excel that runs a mail merge in Publisher. How do I add this filter to the current code? sheet="ALL Sections$", colIndex= icol, criteria="part1name" Code to run mail merge in Publisher: Dim strWorkbookName As String Dim…
1
vote
1 answer

JFrog Artifactory doesn't generate dependency declaration

I created default repository for gradle and published jar into it. I don't see snippets with dependency declaration on the JAR description page. I have only added a local repository. What am I missing?