Skip to content
This repository has been archived by the owner on Apr 30, 2020. It is now read-only.

CTStateGetRequest

mattt edited this page Apr 11, 2020 · 1 revision

CTStateGetRequest

Requests whether contact tracing is on or off on the device.

open class CTStateGetRequest: NSObject

Inheritance

NSObject

Properties

completionHandler

This property holds the completion handler that framework invokes when the request completes. The property is cleared upon completion to break any potential retain cycles.

var completionHandler: CTErrorHandler?

dispatchQueue

This property holds the the dispatch queue used to invoke handlers on. If this property isn't set, the framework uses the main queue.

var dispatchQueue: DispatchQueue?

state

This property contains the snapshot of the state when the request was performed. It's valid only after the framework invokes the completion handler.

var state: Int32

Methods

perform()

Asynchronously performs the request to get the state, and invokes the completion handler when it's done.

open func perform()

invalidate()

Invalidates a previously initiated request. If there is an outstanding completion handler, the framework will invoke it with an error. Don't reuse the request after this is called. If you require another request, create a new one.

open func invalidate()