DITPeer

@interface DITPeer : NSObject <NSCopying>

An instance of Ditto taking part in the mesh network.

  • Address to contact this peer via Ditto Bus, unique with a Ditto mesh network.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) DITAddress *_Nonnull address;
  • Currently active connections of the peer.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSArray<DITConnection *> *_Nonnull connections;
  • The human-readable device name of the peer. This defaults to the hostname but can be manually set by the application developer of the other peer. It is not necessarily unique.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull deviceName;
  • os

    The operating system the peer is running on, nil if (yet) unknown.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *os;
  • The Ditto SDK version the peer is running with, nil if (yet) unknown.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *dittoSDKVersion;
  • Indicates whether the peer is connected to Ditto Cloud.

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isConnectedToDittoCloud) BOOL connectedToDittoCloud;
  • An NSNumber containing a Boolean Indicating whether the peer is compatible with the current

    • peer, nil if (yet) unknown.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSNumber *isCompatible;
  • An optional Query Overlap Group which can be assigned to group certain types of peers together and configure relative connection priorities. Defaults to 0 if not set.

    Declaration

    Objective-C

    @property (nonatomic, readonly) UInt8 queryOverlapGroup;
  • Convenience initializer, initializes the peer with the passed in dictionary representation. Raises an NSInvalidArgumentException if the dictionary representation is not a valid peer representation.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDictionaryRepresentation:
        (nonnull NSDictionary *)dictionaryRepresentation;
  • Initializes the peer with all possible parameters.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithAddress:(nonnull DITAddress *)address
                                connections:
                                    (nonnull NSArray<DITConnection *> *)connections
                                 deviceName:(nonnull NSString *)deviceName
                                         os:(nullable NSString *)os
                            dittoSDKVersion:(nullable NSString *)dittoSDKVersion
                    isConnectedToDittoCloud:(BOOL)isConnectedToDittoCloud
                               isCompatible:(nullable NSNumber *)isCompatible
                          queryOverlapGroup:(UInt8)queryOverlapGroup;
  • Unavailable

    Undocumented

    Declaration

    Objective-C

    - (instancetype)init NS_UNAVAILABLE;
  • Undocumented

    Declaration

    Objective-C

    - (NSUInteger)hash;
  • Undocumented

    Declaration

    Objective-C

    - (BOOL)isEqual:(nullable id)object;
  • Undocumented

    Declaration

    Objective-C

    - (BOOL)isEqualToPeer:(DITPeer *)peer;
  • Undocumented

    Declaration

    Objective-C

    - (DITPeer *)copy;
  • Undocumented

    Declaration

    Objective-C

    - (DITPeer *)copyWithZone:(nullable NSZone *)zone;