I have a field for a user to enter a name into and I think it would be a nicer user experience if it was already pre-populated with their first name.
Is there a way in iOS 5 for an application to get the first name (or a nickname) of the device’s user?
This isn’t exactly what you’re looking for but you can use:
This will return the device name, eg. “John’s iPhone” (of course it will only say this if the user decided to name his device this way). I would not recommend using this in your form as the results can vary and frankly it won’t make sense as a username, but it’s something you might consider anyways.
If you’re trying to get the user’s Apple ID however then I’m pretty sure this isn’t possible.