Progress

struct Progress : Sendable

A struct encapsulating progress information.

  • The number of bytes that have been transferred.

    Declaration

    Swift

    @available(*, deprecated, message: "Use progressEstimate")
    public var transferredBytes: Int { get }
  • The total number of transferrable bytes (bytes that have been transferred, plus bytes pending transfer).

    If the notification block is tracking downloads, this number represents the size of the changesets generated by all other clients using the Realm. If the notification block is tracking uploads, this number represents the size of the changesets representing the local changes on this client.

    Declaration

    Swift

    @available(*, deprecated, message: "Use progressEstimate")
    public var transferrableBytes: Int { get }
  • A value between 0.0 and 1.0 representing the estimated transfer progress. This value is precise for uploads, but will be based on historical data and certain heuristics applied by the server for downloads.

    Whenever the progress reporting mode is forCurrentlyOutstandingWork, that value will monotonically increase until it reaches 1.0. If the progress mode is reportIndefinitely, the value may either increase or decrease as new data needs to be transferred.

    Declaration

    Swift

    public let progressEstimate: Double
  • The fraction of bytes transferred out of all transferrable bytes. If this value is 1, no bytes are waiting to be transferred (either all bytes have already been transferred, or there are no bytes to be transferred in the first place).

    Declaration

    Swift

    @available(*, deprecated, renamed: "progressEstimate", message: "Use progressEstimate")
    public var fractionTransferred: Double { get }
  • Whether all pending data has already been transferred.

    Declaration

    Swift

    public var isTransferComplete: Bool { get }