Other Classes

The following classes are available globally.

  • Entrypoint for accessing information about the amount of disk storage used by Ditto. This class can’t be instantiated. You can access an instance through the ditto.diskUsage API.

    See more

    Declaration

    Swift

    public class DiskUsage
  • The entrypoint for all actions that relate presence of other peers known by the current peer, either directly or through other peers.

    You don’t create one directly but can access it from a particular Ditto instance via its presence property.

    See more

    Declaration

    Swift

    public class DittoPresence
  • Contains information about a remote peer that has requested a connection.

    Connection requests and their authorization are scoped to a specific Ditto peer and connection type.

    See more

    Declaration

    Swift

    public class DittoConnectionRequest
    extension DittoConnectionRequest: CustomStringConvertible
  • An observation token returned by any observation API in the Ditto SDK. Retain this object to continue receiving updates.

    See more

    Declaration

    Swift

    public class DittoObserver
  • The entrypoint for small peer user info collection. Small peer info consists of information gathered into a system collection on a regular interval and optionally synced to the Big Peer for device dashboard and debugging purposes.

    You don’t create this class directly, but can access it from a particular Ditto instance via its smallPeerInfo property.

    See more

    Declaration

    Swift

    public class DittoSmallPeerInfo
  • Provides access to sync related functionality of Ditto.

    See more

    Declaration

    Swift

    public class DittoSync
  • Represents a CRDT counter that can be upserted as part of a document or assigned to a property during an update of a document.

    See more

    Declaration

    Swift

    public class DittoCounter
    extension DittoCounter: Equatable
  • Represents a mutable CRDT counter that can be incremented by a specific amount while updating a document.

    This class can’t be instantiated directly, it’s returned automatically for any counter property within an update block.

    See also the counter properties of DittoDocumentPath and DittoMutableDocumentPath.

    See more

    Declaration

    Swift

    public class DittoMutableCounter : DittoCounter
  • Represents a mutable CRDT register that can be updated while updating a document.

    This class can’t be instantiated directly. It’s returned automatically for any register property within an update block.

    See also the register property of DittoMutableDocumentPath.

    See more

    Declaration

    Swift

    public class DittoMutableRegister
  • Represents a CRDT register that can be upserted as part of a document or assigned to a property during an update of a document.

    See more

    Declaration

    Swift

    public class DittoRegister
  • A store observer invokes an observation handler whenever results for its query change.

    Create a store observer by calling DittoStore.registerObserver(). The store observer will remain active until the owning Ditto object goes out of scope or DittoStoreObserver.cancel() is called.

    See more

    Declaration

    Swift

    public class DittoStoreObserver
    extension DittoStoreObserver: Hashable
    extension DittoStoreObserver: Equatable
  • A sync subscription configures Ditto to receive updates from remote peers about documents matching the subscription’s query.

    Create a sync subscription by calling DittoSync.registerSubscription(). The subscription will remain active until either explicitly cancelled via DittoSyncSubscription.cancel() or the owning Ditto object goes out of scope.

    See more

    Declaration

    Swift

    public class DittoSyncSubscription
    extension DittoSyncSubscription: Hashable
    extension DittoSyncSubscription: Equatable