name
The name of the device.
Declaration
var name: String { get }Discussion
The default value of this property varies according to the device’s operating system version number:
OS | Default value | Example |
|---|---|---|
iOS 15 and earlier | User-assigned device name |
|
iOS 16 and later | Generic device name |
|
In iOS, the user-assigned device name is available in the Settings app under General > About > Name. To access the user-assigned device name through this property in iOS 16 and later, your app must meet certain criteria and be assigned an entitlement. For information, see com.apple.developer.device-information.user-assigned-device-name.