Submit consent to EULA
The SDK allows for the host application to Accept/Reject the EULA. The EULA status is obtained by using the UserService to get the User data.
*Identity: In order to submit the consent to EULA, the application must have a valid user (represented by the Identity). That user must be active.
To submit the consent to EULA, one can use the following snippet
Swift
Kotlin
let service = EULAService(identity: identity)
service.acceptTerms(then: { result in
switch result {
case .success:
// terms accepted
case .failure:
// error
})
val eulaService = EulaService(identity)
eulaService.submitConsent(EulaService.Consent.ACCEPT) { result: Result<Unit> ->
if (result?.value == null || result.throwable != null) {
// failure
} else {
// Success
completionHandler(token)
}
})
Last modified 9mo ago