DITGlobalConfig

@interface DITGlobalConfig : NSObject {
  uint32_t _syncGroup;
}

Settings not associated with any specific type of transport.

  • Undocumented

    Declaration

    Objective-C

    uint32_t _syncGroup
  • The sync group for this device.

    When peer-to-peer transports are enabled, all devices with the same App ID will normally form an interconnected mesh network. In some situations it may be desirable to have distinct groups of devices within the same app, so that connections will only be formed within each group. The syncGroup parameter changes that group membership. A device can only ever be in one sync group, which by default is group 0. Up to 2^32 distinct group numbers can be used in an app.

    This is an optimization, not a security control. If a connection is created manually, such as by specifying a connect transport, then devices from different sync groups will still sync as normal. If two groups of devices are intended to have access to different data sets, this must be enforced using Ditto’s permissions system.

    Declaration

    Objective-C

    @property (nonatomic, readonly) uint32_t syncGroup;
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithDITGlobalConfig:(DITGlobalConfig *)config;
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithSyncGroup:(uint32_t)syncGroup NS_DESIGNATED_INITIALIZER;
  • Undocumented

    Declaration

    Objective-C

    - (BOOL)isEqualToDITGlobalConfig:(DITGlobalConfig *)config;