Don't know how to explain it better. I'm trying to outline the code, because it's a bunch of lines.
My problem is: I want to show the status of such a call in the view.
The view shows a list of
Binding doesn't work and is wrong anyways since it's a SwiftUI thing and shouldn't be used inside an isolated, view independent struct.
I can declare an
I read it may be because status is an enum (value type).
So: how can I have a status update reflected in the view, without moving all functions into the view or view model (where I would have direct access to the published vars)?
Ok, I "solved" it by passing a
For if you're interested, and/or maybe have better ideas.
Maybe there's even a smarter way that avoids having to declare two properties for each type (status var and subject).
Here the subjects probably won't need to be
SPONSORED In-app subscriptions are a pain to implement, hard to test, and full of edge cases. RevenueCat makes it straightforward and reliable so you can get back to building your app. Oh, and it's free if your app makes less than $10k/mo.
You need to create an account or log in to reply.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.