Other Enumerations

The following enumerations are available globally.

  • Enum for the type of file represented by a DiskUsageItem.

    See more

    Declaration

    Swift

    public enum DittoFileSystemType
    extension DittoFileSystemType: CustomStringConvertible
  • Specifies how this instance discovers and connects to peers, including network settings and authentication options. This is a substructure of DittoConfig.

    See more

    Declaration

    Swift

    public enum DittoConfigConnect
    extension DittoConfigConnect: Codable
  • Indicates whether a connection request should be authorized.

    See more

    Declaration

    Swift

    public enum DittoConnectionRequestAuthorization
    extension DittoConnectionRequestAuthorization: Equatable
  • All errors that are thrown by the Ditto SDK are wrapped as a DittoError. 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.
    • encryptionError: An error occurred relating to encryption.
    • migrationError: An error occurred relating to migrations.
    • storeError: An error occurred relating to the store.
    • transportError: An error occurred relating to the network transports.
    • validationError: An error occurred relating to input validation.
    • ioError: An error occurred relating to I/O.
    • unsupportedError: Operation is not supported.
    • useAfterCloseError: An attempt was made to use a Ditto-related object after the object (or one it depends on) has been closed (gone out of scope).
    See more

    Declaration

    Swift

    public enum DittoError : Error
    extension DittoError: LocalizedError
  • The various identity configurations that you can use when initializing a Ditto instance.

    Important

    This enum is being phased out in 4.x and will be removed in v5. Please use DittoConfig instead.
    • offlinePlayground: Develop peer-to-peer apps with no cloud connection. This mode offers no security and must only be used for development.
    • 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 with weak shared token authentication (“Playground mode”). This mode is not secure 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
  • 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
  • Specifies which peers to replicate the small peer info to.

    By default, the small peer info does not leave the current peer. This behavior can be customized to better match a specific application.

    See more

    Declaration

    Swift

    @available(*, deprecated, message: "Will be removed in v5")
    public enum DittoSmallPeerInfoSyncScope : UInt, CaseIterable
    extension DittoSmallPeerInfoSyncScope: CustomStringConvertible
  • 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
  • The type of DittoConnection between two DittoPeers signaling what transport is being used for it.

    See more

    Declaration

    Swift

    public enum DittoConnectionType : String
    extension DittoConnectionType: CaseIterable
    extension DittoConnectionType: Codable
  • Represents the operating system of a peer.

    Note

    When running on a Mac in the Mac Catalyst environment, the OS is classified as iOS.
    See more

    Declaration

    Swift

    public enum DittoPeerOS
    extension DittoPeerOS: Hashable
    extension DittoPeerOS: Equatable
    extension DittoPeerOS: Codable