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
I have no idea whether you use REST or SOAP API...
For REST there's an excellent article by metadaddy: http://wiki.developerforce.com/page/Digging_Deeper_into_OAuth_2.0_at_Salesforce.com#The_Force.com_Identity_Service
Identity Service link is in format of /id/(organization id)/(user id)
, scroll up in this blog post a bit to find out when you should expect it.
SOAP API, offers getUserInfo() method (it returns an object similar to Apex UserInfo
class). Just click the first link there to see the full list of methods you can call.