Skip to main content

Association details

You can retrieve Application and Profile details before proceeding to the association.

The response also tells you whether the code requires a precise location (TFApplicationProfiles.requiresPreciseLocation on iOS, TFApplicationProfiles.requiresPreciseLocation() on Android). This is TrustFactor's own answer, so it is the one to trust — read it here and ask the user for the location permission while they are still on the enrollment screen, before associating the profile.

caution

Not all association codes are valid, in that case, a Error with domain profileAction(code: .invalidAssociationCode) is returned. The same association method can still be valid for the association method.

Client requirements​

Using link​

let url = URL(string: "https://....")

trustfactorClient.applicationProfileForAssociation(method: .deeplink(url)) { result, correlationId in
switch result {
case .success(let response):
// response type: TFApplicationProfiles

case .failure(let error):
// handle errors
}
}

Using an association code​


let code = "....."

trustfactorClient.applicationProfileForAssociation(method: .code(code)) { result, correlationId in
switch result {
case .success(let response):
// response type: TFApplicationProfiles

case .failure(let error):
// handle errors
}
}