Enumerations

The following enumerations are available globally.

  • The various identity configurations that you can use when initializing a Ditto instance.

    • development: (Deprecated - use offlinePlayground instead) Develop peer-to-peer apps with no cloud connection. This mode offers no security and must only be used for development.
    • offlinePlayground: Develop peer-to-peer apps with no cloud connection. This mode offers no security and must only be used for development.
    • online: (Deprecated - use onlineWithAuthentication instead) Run Ditto in secure production mode, logging on to Ditto Cloud or on on-premises authentication server. User permissions are centrally managed.
    • onlineWithAuthentication: Run Ditto in secure production mode, logging on to Ditto Cloud or on on-premises authentication server. User permissions are centrally managed.
    • onlinePlayground: Test a Ditto Cloud app without authentication (“Playground mode”). This mode offers no security and must only be used for development.
    • sharedKey: A mode where any device is trusted provided they know the secret key. This is a simplistic authentication model normally only suitable for private apps where users and devices are both trusted.
    • manual: A manually-provided certificate identity. This accepts a base64-encoded bundle.
    See more

    Declaration

    Swift

    public enum DittoIdentity
  • Enum that maps to an appropriate prefix for a log message.

    See more

    Declaration

    Swift

    public enum DittoLogLevel : Int
  • Provides access to helpers for interoperability with objects from the DittoObjC SDK (which the Swift SDK is based on).

    See more

    Declaration

    Swift

    public enum DittoObjCInterop
  • All errors that are thrown by the Ditto SDK are wrapped as a DittoSwiftError. It wraps multiple different types of error that each have an associated reason.

    You can access more specific information about an error by switching over the error’s reason value. If you want a human-readable version of the error then call localizedDescription on the error’s reason.

    • activationError: An error occurred relating to activating the Ditto instance.
    • authenticationError: An error occurred relating to authenticating the Ditto instance.
    • storeError: An error occurred relating to the store.
    • transportError: An error occurred relating to the network transports.
    See more

    Declaration

    Swift

    public enum DittoSwiftError : Error
    extension DittoSwiftError: LocalizedError
  • A representation of the events that can occur in relation to an attachment fetch.

    There are three different attachment fetch events: completed, progress, or deleted.

    There will be at most one completed or deleted event per attachment fetch. There can be many progress events delivered for each attachment fetch.

    Updates relating to an attachment fetch are delivered by registering a DittoAttachmentFetcher through a call to fetchAttachment on a DittoCollection instance.

    See more

    Declaration

    Swift

    public enum DittoAttachmentFetchEvent
  • Describes the different types of event that you can receive when dealing with live queries.

    • initial: The first event that will be delivered and it will only be delivered once.
    • update: This event will be delivered each time the results of the provided query change. It contains information about the set of documents that previously matched the query before the update, along with information about what documents have been inserted, deleted, updated, or moved, as part of the set of matching documents.
    See more

    Declaration

    Swift

    public enum DittoLiveQueryEvent
    extension DittoLiveQueryEvent: CustomStringConvertible, CustomDebugStringConvertible
  • Describes the direction when sorting a query.

    See more

    Declaration

    Swift

    public enum DittoSortDirection
  • Describes the result of an update operation performed on a DittoMutableDocument.

    • set: Describes the set update that was performed.
    • removed: Describes the remove update that was performed.
    • replacedWithCounter: Describes the replaceWithCounter update that was performed.
    • incremented: Describes the increment update that was performed.
    • pushed: Describes the push update that was performed.
    • popped: Describes the pop update that was performed.
    • inserted: Describes the insert update that was performed.
    See more

    Declaration

    Swift

    public enum DittoUpdateResult
  • Defines the various strategies available when inserting a document into a collection.

    See more

    Declaration

    Swift

    public enum DittoWriteStrategy
  • Describes one part of the result of a write transaction.

    • inserted: Describes a document that has been inserted, referencing its ID and the collection it was inserted into.
    • updated: Describes a document that has been updated, referencing its ID and the collection it belongs to.
    • evicted: Describes a document that has been evicted, referencing its ID and the collection it belonged to.
    • removed: Describes a document that has been removed, referencing its ID and the collection it belonged to.
    See more

    Declaration

    Swift

    public enum DittoWriteTransactionResult
  • Undocumented

    See more

    Declaration

    Swift

    public enum LMDBError : Equatable
  • Undocumented

    See more

    Declaration

    Swift

    public indirect enum CBOR : Equatable, Hashable,
            ExpressibleByNilLiteral, ExpressibleByIntegerLiteral, ExpressibleByStringLiteral,
            ExpressibleByArrayLiteral, ExpressibleByDictionaryLiteral, ExpressibleByBooleanLiteral,
            ExpressibleByFloatLiteral
  • Describes the condition that one of the transports that Ditto uses can be in at a given point in time.

    See more

    Declaration

    Swift

    public enum DittoTransportCondition : UInt32, CustomStringConvertible
  • The subsystem which is reporting a condition change.

    See more

    Declaration

    Swift

    public enum DittoConditionSource : UInt32, CustomStringConvertible