ParseSubscription

public protocol ParseSubscription : 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, if it fits your use case better.

  • The type of the ParseObject that this handler uses.

    Declaration

    Swift

    associatedtype Object : ParseObject
  • 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()