Contents

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

"Ravi’s iPhone 13 Pro"

iOS 16 and later

Generic device name

"iPhone"

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.

See Also

Identifying the device and operating system