unregister User
Unregisters the member from SmartWalking and revokes granted scopes.
Updates the user status on the server to "not configured".
Return
true if unregistration succeeded; false otherwise.
Throws
if unregistration fails.
Android (Kotlin)
lifecycleScope.launch {
try {
val ok = AFCore.smartWalking().unregisterUser()
if (ok) showMessage("Disconnected") else showError("Unregister failed")
} catch (t: Throwable) {
showError("Unregister failed: ${t.message}")
}
}Content copied to clipboard
iOS (Swift)
Task {
do {
let ok = try await AFCore.shared.smartWalking().unregisterUser()
ok ? self.showMessage("Disconnected") : self.showError("Unregister failed")
} catch {
self.showError("Unregister failed: \\(error.localizedDescription)")
}
}Content copied to clipboard