Experimental Functionality

  • Upcoming SDK features made available for prototyping.

    Warning

    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 more

    Declaration

    Objective-C

    @interface DITExperimental : NSObject
  • The name of the history collection.

    Warning

    History Tracking is experimental and shouldn’t be used in production.

    Declaration

    Objective-C

    extern const DITCollectionName _Nonnull DITCollectionNameHistory
  • An address uniquely identifying another peer on the Ditto network.

    See more

    Declaration

    Objective-C

    @interface DITAddress : NSObject <NSCopying>
  • Send and receive messages with remote Ditto peers in the mesh.

    Ditto Bus is separate from the replicated document database. It is used to send one-off messages or create continuous channels with other peers in the mesh, without any persistence. Messages are treated as opaque binary by Ditto and must be created and interpreted by your app.

    Possible uses include:

    • Remote control systems
    • Tunnelling other protocols
    • Gaming
    • Voice and video

    Ditto Bus communications are always between two distinct peers, 1-to-1, and are offered with various delivery guarantees.

    For simple use cases there is a single-message API. These are received on the other peer via DITBusDelegate.

    In advanced situations with requirements such as multiple overlapping streams, notification of stream start and end, and backpressure, individual streams can be opened using the openStream function. Once opened, these are symmetric/bidirectional message-oriented communication channels. The remote peer will receive their stream via DITBusDelegate.

    See more

    Declaration

    Objective-C

    @interface DITBus : NSObject
  • Callbacks relating to Ditto Bus for both receiving single messages and accepting incoming streams.

    See more

    Declaration

    Objective-C

    @protocol DITBusDelegate <NSObject>
  • Reliability modes for bus streams.

    See more

    Declaration

    Objective-C

    enum DITBusReliability : NSUInteger {}
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface DITBusMessage : NSObject
    
    @property (nonatomic, strong, readonly) DITAddress *sender;
    @property (nonatomic, copy, readonly) NSData *data;
    
    - (instancetype)init NS_UNAVAILABLE;
    
    @end
  • A message-based communication channel to another peer in the mesh.

    When a DittoBusStream is received by any means, you must immediately set a delegate. This provides the notifications of incoming messages and other events.

    Outgoing messages can be enqueued using enqueueMessage. You must wait for the delegate method indicating that the enqueue was successful before calling this method again. This process provides backpressure so that your app does not send data more quickly than the network can deliver.

    See more

    Declaration

    Objective-C

    @interface DITBusStream : NSObject
  • Callbacks required to use the Ditto Bus API with explicit stream handles.

    See more

    Declaration

    Objective-C

    @protocol DITBusStreamDelegate <NSObject>
  • The priority with which the local device should reach out to particular remote peers in the Ditto mesh.

    For most use-cases, this API is not required as Ditto will automatically create an optimal P2P mesh. Certain use-cases, however, might require more manual control over how the mesh is formed.

    See more

    Declaration

    Objective-C

    enum DITConnectionPriority : NSUInteger {}
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface DITPeerV2Parser : NSObject
    
    + (NSArray<DITRemotePeerV2 *> *__nullable)parseJSON:(NSString *)json;
    
    @end