I have an iOS app using the latest Salesforce iOS SDK. It authenticates users through a webview using oAuth2.0 on the Salesforce site so I do not capture the username in my app
You need to import SFAuthenticationManager.h class
#import
then you can get user details (first name, last name, email etc.) this way
NSLog(@"userData= %@",[SFAuthenticationManager sharedManager].idCoordinator.idData);
NSLog(@"first name = %@",[SFAuthenticationManager sharedManager].idCoordinator.idData.firstName);
NSLog(@"last name = %@",[SFAuthenticationManager sharedManager].idCoordinator.idData.lastName);
NSLog(@"email name = %@",[SFAuthenticationManager sharedManager].idCoordinator.idData.email);