How do you get an iPhone's device name

Brandon O'Rourke picture Brandon O'Rourke · Jul 8, 2009 · Viewed 109.2k times · Source

If you open Settings -> General -> About, it'll say Bob's iPhone at the top of the screen. How do you programmatically grab that name?

Answer

Stickley picture Stickley · Oct 27, 2011

In addition to the above answer, this is the actual code:

[[UIDevice currentDevice] name];