DBTEAMDeviceSession
Objective-C
@interface DBTEAMDeviceSession : NSObject <DBSerializable, NSCopying>
Swift
class 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 (nonatomic, copy, readonly) NSString *_Nonnull sessionId;
Swift
var sessionId: String { get }
-
The IP address of the last activity from this session.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *ipAddress;
Swift
var ipAddress: String? { get }
-
The country from which the last activity from this session was made.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *country;
Swift
var country: String? { get }
-
The time this session was created.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSDate *created;
Swift
var created: Date? { get }
-
The time of the last activity from this session.
Declaration
Objective-C
@property (nonatomic, readonly, 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.