DBTEAMDeviceSession

@interface DBTEAMDeviceSession : NSObject <DBSerializable, NSCopying>

The DeviceSession struct.

This class implements the DBSerializable protocol (serialize and deserialize instance methods), which is required for all Obj-C SDK API route objects.

  • The session id.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull sessionId;

    Swift

    var sessionId: String { get }
  • The IP address of the last activity from this session.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable) NSString *ipAddress;

    Swift

    var ipAddress: String? { get }
  • The country from which the last activity from this session was made.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable) NSString *country;

    Swift

    var country: String? { get }
  • The time this session was created.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSDate *created;

    Swift

    var created: Date? { get }
  • The time of the last activity from this session.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSDate *updated;

    Swift

    var updated: Date? { get }
  • Full constructor for the struct (exposes all instance variables).

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSessionId:(nonnull NSString *)sessionId
                                    ipAddress:(nullable NSString *)ipAddress
                                      country:(nullable NSString *)country
                                      created:(nullable NSDate *)created
                                      updated:(nullable NSDate *)updated;

    Swift

    init(sessionId: String, ipAddress: String?, country: String?, created: Date?, updated: Date?)

    Parameters

    sessionId

    The session id.

    ipAddress

    The IP address of the last activity from this session.

    country

    The country from which the last activity from this session was made.

    created

    The time this session was created.

    updated

    The time of the last activity from this session.

    Return Value

    An initialized instance.

  • Convenience constructor (exposes only non-nullable instance variables with no default value).

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSessionId:(nonnull NSString *)sessionId;

    Swift

    init(sessionId: String)

    Parameters

    sessionId

    The session id.

    Return Value

    An initialized instance.