RLMSyncProgressMode

Objective-C

enum RLMSyncProgressMode : NSUInteger {}

Swift

enum RLMSyncProgressMode : UInt

The desired behavior of a progress notification block.

Progress notification blocks can be registered on sessions if your app wishes to be informed how many bytes have been uploaded or downloaded, for example to show progress indicator UIs.

  • The block will be called indefinitely, or until it is unregistered by calling -[RLMProgressNotificationToken invalidate].

    Notifications will always report the latest number of transferred bytes, and the most up-to-date number of total transferrable bytes.

    Declaration

    Objective-C

    RLMSyncProgressModeReportIndefinitely

    Swift

    case reportIndefinitely = 0
  • The block will, upon registration, store the total number of bytes to be transferred. When invoked, it will always report the most up-to-date number of transferrable bytes out of that original number of transferrable bytes.

    When the number of transferred bytes reaches or exceeds the number of transferrable bytes, the block will be unregistered.

    Declaration

    Objective-C

    RLMSyncProgressModeForCurrentlyOutstandingWork

    Swift

    case forCurrentlyOutstandingWork = 1