QuerySubscribable

public protocol QuerySubscribable : AnyObject

This protocol describes the interface for handling events from a ParseLiveQuery client. You can use this protocol on any custom class of yours, instead of Subscription or SubscriptionCallback, if it fits your use case better.

  • The ParseObject associated with this subscription.

    Declaration

    Swift

    associatedtype Object : ParseObject
  • The query associated with this subscription.

    Declaration

    Swift

    var query: Query<Object> { get set }
  • Creates a new subscription that can be used to handle updates.

    Declaration

    Swift

    init(query: Query<Object>)
  • Tells the handler that an event has been received from the ParseLiveQuery Server.

    Declaration

    Swift

    func didReceive(_ eventData: Data) throws

    Parameters

    eventData

    The event data that has been recieved from the server.

  • Tells the handler that a query has been successfully registered with the server.

    Note

    This may be invoked multiple times if the client disconnects/reconnects.

    Declaration

    Swift

    func didSubscribe(_ new: Bool)
  • Tells the handler that a query has been successfully deregistered from the server.

    Note

    This is not called unless unsubscribe() is explicitly called.

    Declaration

    Swift

    func didUnsubscribe()