Skip to main content

Terms, Location & Notifications

Models and methods for Terms & Conditions acceptance, location updates, push notifications, and deeplink handling.

TFTermsAndConditions

Represents a version of the Terms & Conditions document.

public class TFTermsAndConditions {
public enum ContentType {
case html
}

public let isLatest: Bool
public let contentType: ContentType
public let version: String

public init(
contentType: ContentType,
version: String,
isLatest: Bool,
contentURL: URL
)

/// Fetches the raw content data. Subsequent calls return the cached result.
public func getContentData(_ callback: @escaping ((Data?, Error?) -> Void))
}

Content

The raw content of a Terms & Conditions document.

Returned inline via TFTermsAndConditions.getContentData().

TFLocationProvider

Describes the source used to determine the device's location.

public enum TFLocationProvider {
case coreLocation(CLLocation)
case ip
}

TFLocation

Wraps a location provider with its associated data.

Handled inline via TFLocationProvider (the coreLocation case carries the CLLocation).

TFSetLocationResponse

The result of a location update request.

public struct TFSetLocationResponse {
public enum State {
case updated
case notSignificant
}

public let state: State

public init(state: State)
}

TFPushNotificationType

Identifies the type of an incoming TrustFactor push notification, carrying its associated data.

public enum TFPushNotificationType: String {
case receivedSharedProfile
case operationPending
case operationDecided
}

TFDeeplinkType

Identifies the intent of a TrustFactor universal link.

public enum TFDeeplinkType {
case association
case operation
}