After signing in successfully I want to get the value of a particular attribute. Is it possible to do this without iterating through each attribute? I know I can't subscript but is there any other way?
So in the example below what I want is the value of the user's email. Ideally, I would like to say let email = userAttributes["email"]
but this type does not allow subscription.
user?.getDetails().continueOnSuccessWith(block: { (task) -> Any? in
let userAttributes = task.result?.userAttributes
for attribute in userAttributes! {
print(attribute.name!)
print(attribute.value!)
}
return nil
})