RiskProvider
final class RiskProvider
extension RiskProvider: RiskProviding
extension RiskProvider: ActivityStateProviderDelegate
Undocumented
-
init(configuration:
store: exposureSummaryProvider: appConfigurationProvider: exposureManagerState: targetQueue: ) Undocumented
Declaration
Swift
init( configuration: RiskProvidingConfiguration, store: Store, exposureSummaryProvider: ExposureSummaryProvider, appConfigurationProvider: AppConfigurationProviding, exposureManagerState: ExposureManagerState, targetQueue: DispatchQueue = .main )
-
Undocumented
Declaration
Swift
@Published private(set) var activityState: ActivityState { get set }
-
Undocumented
Declaration
Swift
var exposureManagerState: ExposureManagerState
-
Undocumented
Declaration
Swift
var configuration: RiskProvidingConfiguration
-
Undocumented
Declaration
Swift
func observeRisk(_ consumer: RiskConsumer)
-
Undocumented
Declaration
Swift
func removeRisk(_ consumer: RiskConsumer)
-
Undocumented
Declaration
Swift
var manualExposureDetectionState: ManualExposureDetectionState? { get }
-
Called by consumers to request the risk level. This method triggers the risk level process.
Declaration
Swift
func requestRisk(userInitiated: Bool, ignoreCachedSummary: Bool = false, completion: Completion? = nil)
-
Returns the next possible date of a exposureDetection Case1: Date is a valid date in the future Case2: Date is in the past (could be .distantPast) (usually happens when no detection has been run before (e.g. fresh install). For Case2, we need to calculate the remaining time until we reach a full 24h of tracing.
Declaration
Swift
func nextExposureDetectionDate() -> Date
-
Note
The activity state is propagated to subscribers via a sink that can be found in the RiskProvider initializer.Declaration
Swift
func provideActivityState(_ state: ActivityState)