DatasyncCompletedSubscriptionPolicy

public enum DatasyncCompletedSubscriptionPolicy

A value representing the policy to apply to a completed subscription.

Whatever the policy, when a subscription is completed, its callback stops to be called. If the subscription is held by a view that is closed, the subscription must be completed as soon as its event callback uses the view.

The SDK can keep the data available in the cache. This makes it possible to obtain the last got value in case of a subsequent read when there is no network connection at that time.

It can also continue to silently maintain up-to-date the cache for that subscription. This can be useful when the subscription is intended to be redone later, perhaps while being offline. In this case, it may be preferable to present the user with the most recent value of the data, including a post-subscription value. However, this continues to consume network bandwidth as data continues to be transferred.

Cases

  • Indicates to forget data in the cache and to stop updating them.

    Declaration

    Swift

    case forgetData
  • Indicates to keep data in the cache but to stop updating them.

    Declaration

    Swift

    case keepData
  • Indicates to keep data in the cache and to keep updating them.

    Declaration

    Swift

    case keepUpdatingData
  • Indicates to keep data in the cache and to keep updating them if the subscription is cancelled implicitly.

    The updating of cache data for explicitly cancelled or revoked subscriptions will be stopped. The content of the cache will be kept in all cases.

    Declaration

    Swift

    case keepUpdatingDataWhenImplicit