DBTEAMActiveWebSession

Objective-C

@interface DBTEAMActiveWebSession
    : DBTEAMDeviceSession <DBSerializable, NSCopying>

Swift

class DBTEAMActiveWebSession : DBTEAMDeviceSession, DBSerializable, NSCopying

The ActiveWebSession struct.

Information on active web sessions.

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

Instance fields

  • Information on the hosting device.

    Declaration

    Objective-C

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

    Swift

    var userAgent: String { get }
  • os

    Information on the hosting operating system.

    Declaration

    Objective-C

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

    Swift

    var os: String { get }
  • Information on the browser used for this web session.

    Declaration

    Objective-C

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

    Swift

    var browser: String { get }
  • The time this session expires.

    Declaration

    Objective-C

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

    Swift

    var expires: Date? { get }

Constructors

  • Full constructor for the struct (exposes all instance variables).

    Declaration

    Objective-C

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

    Swift

    init(sessionId: String, userAgent: String, os: String, browser: String, ipAddress: String?, country: String?, created: Date?, updated: Date?, expires: Date?)

    Parameters

    sessionId

    The session id.

    userAgent

    Information on the hosting device.

    os

    Information on the hosting operating system.

    browser

    Information on the browser used for this web session.

    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.

    expires

    The time this session expires.

    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
                                    userAgent:(nonnull NSString *)userAgent
                                           os:(nonnull NSString *)os
                                      browser:(nonnull NSString *)browser;

    Swift

    init(sessionId: String, userAgent: String, os: String, browser: String)

    Parameters

    sessionId

    The session id.

    userAgent

    Information on the hosting device.

    os

    Information on the hosting operating system.

    browser

    Information on the browser used for this web session.

    Return Value

    An initialized instance.