Classes
The following classes are available globally.
-
See moreDitto
is the entry point for accessing Ditto-related functionality.Declaration
Swift
public class Ditto
-
Provides access to authentication information and methods for logging on to Ditto Cloud. Relevant when using an
See moreonlineWithAuthentication
or anonline
identity.Declaration
Swift
public class DittoAuthenticator
-
Upcoming SDK features made available for prototyping.
Experimental functionality should not be used in production applications as it may be changed or removed at any time, and may not have the same security features.
See moreDeclaration
Swift
public class DittoExperimental
-
Class with static methods to customize the logging behavior from Ditto.
See moreDeclaration
Swift
public class DittoLogger
-
An observation token returned by any observation API in the Ditto SDK. Retain this object to continue receiving updates.
See moreDeclaration
Swift
public class DittoObserver
-
Represents an attachment and can be used to insert the associated attachment into a document at a specific key.
See moreDeclaration
Swift
public class DittoAttachment : Hashable
-
These objects are returned by calls to
See morefetchAttachment
onDittoCollection
s. They must be kept alive for the fetching of the attachment to proceed and for you to be notified once the status of the fetch request has changed.Declaration
Swift
public class DittoAttachmentFetcher
-
Serves as a token for a specific attachment that you can pass to a call to
See morefetchAttachment
on aDittoCollection
.Declaration
Swift
public class DittoAttachmentToken : Equatable
-
A reference to a collection in a
See moreDittoStore
.Declaration
Swift
public class DittoCollection
-
A document belonging to a
See moreDittoCollection
with an inner value.Declaration
Swift
public class DittoDocument
extension DittoDocument: CustomStringConvertible, CustomDebugStringConvertible
extension DittoDocument: Identifiable
-
The type that is returned when calling when calling
See moreobserve
orobserveLocal
on aDittoPendingCursorOperation
object. It handles the logic for calling the event handler that is provided toobserve
orobserveLocal
calls.DittoLiveQuery
objects must be kept in scope for as long as you with to have your event handler be called when there is an update to a document matching the query you provide.Declaration
Swift
public class DittoLiveQuery
-
This is used as part of update operations for documents. It provides access to updating a document through a subscript-based API. A subscript operation returns a
See moreDittoMutableDocumentPath
that you can then use to chain further subscript operations to in order to access nested values in a document. Once you’ve defined the path to a key in a document that you’d like to update, by using subscripts, then you can use the functionality defined onDittoMutableDocumentPath
to perform the desired document update(s). Note that objects of this type should only be used within the scope of the update closure that they are provided in.Declaration
Swift
public class DittoMutableDocument
-
Provides an interface to specify a path to a key in a document that you can then call various update functions on. You obtain a
See moreDittoMutableDocumentPath
by subscripting aDittoMutableDocument
and you can then further subscript aDittoMutbaleDocumentPath
to further specify the key of the document that you want to update.Declaration
Swift
public class DittoMutableDocumentPath: Swift.ExpressibleByStringLiteral, Swift.ExpressibleByIntegerLiteral, Swift.ExpressibleByBooleanLiteral, Swift.ExpressibleByFloatLiteral, Swift.ExpressibleByDictionaryLiteral, Swift.ExpressibleByArrayLiteral, Swift.ExpressibleByNilLiteral
-
These objects are returned when calling
collections()
onDittoStore
.They allow chaining of further collections-related functions. You can either call
exec
on the object to get an array ofDittoCollection
s as an immediate return value, or you can establish either a live query or a subscription, which both work over time.A live query, established by calling
observe
, will notify you every time there’s a change in the collections that the device knows about.A subscription, established by calling
subscribe
, will act as a signal to other peers that the device connects to that you would like to receive updates from them about the collections that they know about.Calling
observe
will generate both a subscription and a live query at the same time.If you’d like to only observe local changes then you can call
observeLocal
.If you want to observe changes in such a way that you can signal when you’re ready for the live query to deliver a new update then you can call
See moreobserveWithNextSignal
orobserveLocalWithNextSignal
.Declaration
Swift
public class DittoPendingCollectionsOperation
-
These objects are returned when using
See morefind
-like functionality onDittoCollection
s. They allow chaining of further query-related functions to do things like add a limit to the number of documents you want returned or specify how you want the documents to be sorted and ordered. You can either callexec
on the object to get an array ofDittoDocument
s as an immediate return value, or you can establish either a live query or a subscription, which both work over time. A live query, established by callingobserve
, will notify you every time there’s an update to a document that matches the query you provided in the precedingfind
-like call. A subscription, established by callingsubscribe
, will act as a signal to other peers that the device connects to that you would like to receive updates from them about documents that match the query you provided in the precedingfind
-like call. Callingobserve
will generate both a subscription and a live query at the same time. If you’d like to only observe local changes then you can callobserveLocal
. Update and remove functionality is also exposed through this object.Declaration
Swift
public class DittoPendingCursorOperation
-
These objects are returned when using
See morefindByID
functionality onDittoCollection
s. You can either callexec
on the object to get an immediate return value, or you can establish either a live query or a subscription, which both work over time. A live query, established by callingobserve
, will notify you every time there’s an update to the document with the ID you provided in the precedingfindByID
call. A subscription, established by callingsubscribe
, will act as a signal to other peers that you would like to receive updates from them about the document with the ID you provided in the precedingfindByID
call. Callingobserve
will generate both a subscription and a live query at the same time. If you’d like to only observe local changes then you can callobserveLocal
. Update and remove functionality is also exposed through this object.Declaration
Swift
public class DittoPendingIDSpecificOperation
-
See moreDittoScopedWriteTransaction
exposes functionality that allows you to perform multiple operations on the store within a single write transaction.Declaration
Swift
public class DittoScopedWriteTransaction
-
See moreDittoStore
provides access toDittoCollection
s and a write transaction API.Declaration
Swift
public class DittoStore
-
Used to subscribe to receive updates from remote peers about matching documents.
While
See moreDITSubscription
objects remain in scope they ensure that documents in the collection specified and that match the query provided will try to be kept up-to-date with the latest changes from remote peers.Declaration
Swift
public class DittoSubscription
-
A document belonging to a
See moreDittoCollection
with an inner typed value.Declaration
Swift
public class DittoTypedDocument<T> where T : Decodable
-
See moreDittoWriteTransaction
exposes functionality that allows you to perform multiple operations on the store within a single write transaction. You must use thescoped
function to get collection-scoped access to the write transaction object, which will then allow you to perform insert, update, remove or evict operations using the write transaction.Declaration
Swift
public class DittoWriteTransaction
-
These objects are returned when using
See morefind
andfindAll
functionality onDittoScopedWriteTransaction
s. You can use them to perform updates on documents and remove or evict documents.Declaration
Swift
public class DittoWriteTransactionPendingCursorOperation
-
These objects are returned when using
See morefindByID
functionality onDittoScopedWriteTransaction
s. You can use them to perform updates on a document and remove or evict a document.Declaration
Swift
public class DittoWriteTransactionPendingIDSpecificOperation
-
An address uniquely representing another device on the Ditto network.
Declaration
Swift
public class DittoAddress
-
Undocumented
See moreDeclaration
Swift
public class DittoBusMessage
-
Send and receive messages with remote Ditto peers in the mesh.
See moreDeclaration
Swift
public class DittoBus
-
Undocumented
See moreDeclaration
Swift
public class DittoPeerV2Parser
-
Undocumented
See moreDeclaration
Swift
public class DittoRemotePeerV2
-
Undocumented
See moreDeclaration
Swift
public class DittoTransportDiagnostics
-
Undocumented
See moreDeclaration
Swift
public class DittoTransportSnapshot