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
FOR SWIFT
To display full name and chatter profile picture of logged in user in UILabel and UIImageView using Salesforce Mobile SDK 4 you need to first create @IBOutlets
@IBOutlet weak var yourtextLabel: UILabel!
@IBOutlet weak var profileImage: UIImageView!
Then all you need is the following in your viewDidLoad()
yourtextLabel.text = SFAuthenticationManager.sharedManager().idCoordinator.idData.displayName
let imageURL = SFAuthenticationManager.sharedManager().idCoordinator.idData.pictureUrl
let image = UIImage(data: NSData(contentsOfURL: imageURL!)!)
profileImage.image = image