RLMSyncSubscriptionState

Objective-C

enum RLMSyncSubscriptionState : NSUInteger {}

Swift

enum RLMSyncSubscriptionState : UInt, @unchecked Sendable

The current state of the subscription. This can be used for ensuring that the subscriptions are not errored and that it has been successfully synced to the server.

  • The subscription is complete and the server has sent all the data that matched the subscription queries at the time the subscription set was updated. The server is now in a steady-state synchronization mode where it will stream update as they come.

    Declaration

    Objective-C

    RLMSyncSubscriptionStateComplete

    Swift

    case complete = 0
  • The subscription encountered an error and synchronization is paused for this Realm. You can find the error calling error in the subscription set to get a description of the error. You can still use the current subscription set to write a subscription.

    Declaration

    Objective-C

    RLMSyncSubscriptionStateError

    Swift

    case error = 1
  • The subscription is persisted locally but not yet processed by the server, which means the server hasn’t yet returned all the data that matched the updated subscription queries.

    Declaration

    Objective-C

    RLMSyncSubscriptionStatePending

    Swift

    case pending = 2
  • The subscription set has been super-ceded by an updated one, this typically means that someone is trying to write a subscription on a different instance of the subscription set. You should not use a superseded subscription set and instead obtain a new instance of the subscription set to write a subscription.

    Declaration

    Objective-C

    RLMSyncSubscriptionStateSuperseded

    Swift

    case superseded = 3