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 |
|---|---|---|
watchOS 8 and earlier | User-assigned device name |
|
watchOS 9 and later | Generic device name |
|
In watchOS, 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 watchOS 9 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.