I am trying to access the user name and user Image url after login using AWS SDK iOS but i am getting following error :
Value of type 'AWSIdentityManager' has no member 'identityProfile' Although the same code was working fine in previous SDK(2.5.10), please help me in getting the user details after login.
My current SDK version is 2.6.1
Here is my code :-
if let identityUserName = identityManager.identityProfile?.userName {
print("User ID\( identityManager.identityId!)")
print("User name\(identityUserName)")
}
if let imageURL = identityManager.identityProfile?.imageURL {
print(imageURL)
}
I have managed to access the user Name by using following code if i login with custom login , but if i try to login with Facebook or Gmail i get nil in response.
Code :-
let currUserPool = AWSCognitoIdentityUserPool.default()
let currUser = currUserPool.currentUser()
let username = currUser?.username