Setting Up DittoObjC

  • The entrypoint to the Ditto SDK.

    For a DITDitto instance to continue to connect to other devices it must be kept in scope.

    See more

    Declaration

    Objective-C

    @interface DITDitto : NSObject
  • An optional delegate object that can be used to get updates about events occurring that relate to the DITDitto object that the delegate was tied to.

    See more

    Declaration

    Objective-C

    @protocol DITDittoDelegate <NSObject>
  • Settings not associated with any specific type of transport.

    See more

    Declaration

    Objective-C

    @interface DITGlobalConfig : NSObject
  • Settings not associated with any specific type of transport.

    See more

    Declaration

    Objective-C

    @interface DITMutableGlobalConfig : DITGlobalConfig
  • A configuration object specifying which network transports Ditto should use to sync data.

    A DITDitto object comes with a default transport configuration where all available peer-to-peer transports are enabled. You can customize this by initializing a DITMutableTransportConfig, adjusting its properties, and supplying it to setTransportConfig: on DITDitto.

    When you initialize a DITMutableTransportConfig yourself it starts with all transports disabled. You must enable each one directly.

    Peer-to-peer transports will automatically discover peers in the vicinity and create connections without any configuration. These are configured inside the peerToPeer property. To turn each one on, set its enabled property to YES.

    To connect to a peer at a known location, such as a Ditto Big Peer, add its address inside the connect configuration. These are either “host:port” strings for raw TCP sync, or a “wss://…” URL for websockets.

    The listen configurations are for specific less common data sync scenarios. Please read the documentation on the Ditto website for examples. Incorrect use of listen can result in insecure configurations.

    See more

    Declaration

    Objective-C

    @interface DITTransportConfig : NSObject <NSCopying, NSMutableCopying>
  • A configuration object specifying which network transports Ditto should use to sync data.

    A DITDitto object comes with a default transport configuration where all available peer-to-peer transports are enabled. You can customize this by initializing a DITMutableTransportConfig, adjusting its properties, and supplying it to setTransportConfig: on DITDitto.

    When you initialize a DITMutableTransportConfig yourself it starts with all transports disabled. You must enable each one directly.

    Peer-to-peer transports will automatically discover peers in the vicinity and create connections without any configuration. These are configured inside the peerToPeer property. To turn each one on, set its enabled property to YES.

    To connect to a peer at a known location, such as a Ditto Big Peer, add its address inside the connect configuration. These are either “host:port” strings for raw TCP sync, or a “wss://…” URL for websockets.

    The listen configurations are for specific less common data sync scenarios. Please read the documentation on the Ditto website for examples. Incorrect use of listen can result in insecure configurations.

    See more

    Declaration

    Objective-C

    @interface DITMutableTransportConfig : DITTransportConfig