Array

extension Array where Element: ENTemporaryExposureKey
extension Array where Element == SAP_RiskScoreClass
extension Array where Element == TracingStatusEntry

Available where Element: ENTemporaryExposureKey

Available where Element == SAP_RiskScoreClass

  • low

    Undocumented

    Declaration

    Swift

    var low: SAP_RiskScoreClass? { get }
  • Undocumented

    Declaration

    Swift

    var high: SAP_RiskScoreClass? { get }

Creating a Tracting Status History from JSON encoded data

Getting a JSON encoded data representation

  • Undocumented

    Declaration

    Swift

    func JSONData() throws -> Data

Adjusting the History based on a new State reported by the Exposure Notification framework

Check Tracing History for Risk Calculation

  • Check the TracingStatusHistory if it has been turned on for timeInterval seconds

    Typically used to check the tracing duration precondition for risk calculation

    Declaration

    Swift

    func checkIfEnabled(
    	for continuousInterval: TimeInterval = Self.minimumActiveSeconds,
    	since date: Date = Date()
    ) -> Bool

    Parameters

    timeInterval

    Seconds to use as the threshold. Defaults to 24 hours.

    date

    Date to use as the baseline. Defaults to Date()

  • Mark returns the active tracing info.

    Declaration

    Swift

    func activeTracing(
    	since date: Date = Date(),
    	maximumNumberOfDays: Int = Self.maxStoredDays
    ) -> ActiveTracing

    Parameters

    since

    Date to use as the baseline. Defaults to Date()

    maximumNumberOfDays

    Maximum number of days we keep in the history.

Constants for Tracing

  • The minimum count of hours tracing must have been active for risk calculation to work

    Declaration

    Swift

    static let minimumActiveHours: Int
  • The minimum count of seconds tracing must have been active for risk calculation to work

    Declaration

    Swift

    static var minimumActiveSeconds: TimeInterval { get }
  • The maximum count of days to keep tracing history for

    Declaration

    Swift

    static let maxStoredDays: Int
  • The maximum count of seconds to keep tracing history for

    Declaration

    Swift

    static var maxStoredSeconds: TimeInterval { get }