UsageReporter
open class UsageReporter
This object is capable of creating and storing usage records for a specific target identifier.
-
Tells whether the reporter is enabled or not. If it is not enabled, calls to the report method are ignored.
Declaration
Swift
public var enabled: Bool { get set }
-
Stores the given usage record. If the reporter is disabled this method does nothing.
Declaration
Swift
public func report(_ record: UsageRecord)
Parameters
record
the record to be stored
-
Creates an usage record from the provided parameters and stores it. If the reporter is disabled this method does nothing.
Declaration
Swift
open func report(_ event: UsageRecord.Event, date: Date = Date(), info: [String : Any] = [:])
Parameters
event
the usage event
time
time of the event
info
additional informations associated with this record