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?
Ios – How to get an iPhone’s device name
iosuikit
iosuikit
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?
Best Solution
From the
UIDevice
class:Swift version:
UIDevice.current.name
Objective-C version:
[[UIDevice currentDevice] name];
source: http://servin.com/iphone/uidevice/iPhone-UIDevice.html
Offical Documentation: Apple Developer Documentation >
UIDevice
Class Reference