Subscription
open class Subscription<T> : QueryViewModel<T>, QuerySubscribable where T : ParseObject
A default implementation of the QuerySubscribable
protocol. Suitable for ObjectObserved
as the subscription can be used as a SwiftUI publisher. Meaning it can serve
indepedently as a ViewModel in MVVM. Also can be used as a Combine publisher. See Apple’s
documentation
for more details.
-
Updates and notifies when a subscription request has been fulfilled and if it is new.
Declaration
Swift
open var subscribed: (query: Query<T>, isNew: Bool)? { get set }
-
Updates and notifies when an unsubscribe request has been fulfilled.
Declaration
Swift
open var unsubscribed: Query<T>? { get set }
-
Creates a new subscription that can be used to handle updates.
Declaration
Swift
public required init(query: Query<T>)
-
Declaration
Swift
open func didReceive(_ eventData: Data) throws
-
Declaration
Swift
open func didSubscribe(_ new: Bool)
-
Declaration
Swift
open func didUnsubscribe()