Enumerations
The following enumerations are available globally.
-
The various identity configurations that you can use when initializing a
Dittoinstance.- development: (Deprecated - use
offlinePlaygroundinstead) 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
onlineWithAuthenticationinstead) 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.
Declaration
Swift
public enum DittoIdentity - development: (Deprecated - use
-
Enum that maps to an appropiate prefix for a log message.
See moreDeclaration
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 moreDeclaration
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
reasonvalue. If you want a human-readable version of the error then calllocalizedDescriptionon 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.
Declaration
Swift
public enum DittoSwiftError : Errorextension 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, ordeleted.There will be at most one
completedordeletedevent per attachment fetch. There can be manyprogressevents delivered for each attachment fetch.Updates relating to an attachment fetch are delivered by registering a
See moreDittoAttachmentFetcherthrough a call tofetchAttachmenton aDittoCollectioninstance.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.
Declaration
Swift
public enum DittoLiveQueryEventextension DittoLiveQueryEvent: CustomStringConvertible, CustomDebugStringConvertible -
Describes the direction when sorting a query.
See moreDeclaration
Swift
public enum DittoSortDirection -
Describes the result of an update operation performed on a
DittoMutableDocument.- set: Describes the
setupdate that was performed. - removed: Describes the
removeupdate that was performed. - replacedWithCounter: Describes the
replaceWithCounterupdate that was performed. - incremented: Describes the
incrementupdate that was performed. - pushed: Describes the
pushupdate that was performed. - popped: Describes the
popupdate that was performed. - inserted: Describes the
insertupdate that was performed.
Declaration
Swift
public enum DittoUpdateResult - set: Describes the
-
Defines the various strategies available when inserting a document into a collection.
See moreDeclaration
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.
Declaration
Swift
public enum DittoWriteTransactionResult -
Undocumented
See moreDeclaration
Swift
public enum LMDBError : Equatable -
Undocumented
See moreDeclaration
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 moreDeclaration
Swift
public enum DittoTransportCondition : UInt32, CustomStringConvertible -
The subsystem which is reporting a condition change.
See moreDeclaration
Swift
public enum DittoConditionSource : UInt32, CustomStringConvertible
Enumerations Reference