UsageRecord
public struct UsageRecord
Captures all event parameters which should be persisted
-
Info key used in UsageRecord struct.
Declaration
Swift
public static let sessionIdentifierKey: String
-
Info key used in UsageRecord struct.
Declaration
Swift
public static let deviceIdentifierKey: String
-
Info key used in UsageRecord struct.
Declaration
Swift
public static let deviceModelKey: String
-
Info key used in UsageRecord struct.
Declaration
Swift
public static let systemVersionKey: String
-
Info key used in UsageRecord struct.
Declaration
Swift
public static let systemNameKey: String
-
Usage Event
See moreDeclaration
Swift
public enum Event : CustomStringConvertible
-
Assembles a dictionary containing informations about the session.
The dictionary contains the following fields:
- sessionIdentifier: a newly generated UUID string
- deviceIdentifier: the current device identifierForVendor string or “empty” if that is nil
- deviceModel: the current device model, such as iPhone
- systemName: the name of the system, such as iOS
- systemVersion: the string representation of the system version
Declaration
Swift
public static func defaultSessionInfo() -> [String : Any]
-
The event of the record.
Declaration
Swift
public let event: Event
-
The date of the record.
Declaration
Swift
public let date: Date
-
The info of the record, can be any JSON serializable structure.
Declaration
Swift
public let info: [String : Any]
-
Instantiates the UsageRecord
Declaration
Swift
public init(event: UsageRecord.Event, date: Date = Date(), info: [String : Any] = [:])
Parameters
event
usage event
date
date information
info
info object